Gauth

Linear algebra

Linear Algebra Solver with Step-by-Step Answers

Row reduction, determinants, inverses, and eigenvalues with every elementary operation written in the notation your course uses.

Solve a linear algebra problem now

First solution free

Linear algebra is unusually unforgiving of small slips. One sign error in the third row of an elimination propagates into every subsequent step, and the final matrix looks perfectly reasonable. The only defence is writing each operation down and checking the result against something independent, which is how the solutions here are structured: operation, resulting matrix, then a check when one is cheap.

Enter a matrix as nested brackets, [[2, 1], [7, 4]], or as rows of numbers separated by semicolons. Systems can be typed as equations and are converted to an augmented matrix for you, with the conversion shown so you can see which column holds which variable.

What this solver handles

  • Addition, scalar multiplication, transposition, and matrix multiplication with the dimension check performed first.
  • Determinants by cofactor expansion or row reduction, including the sign pattern that trips people on 3x3 matrices.
  • Inverses by adjugate or Gauss-Jordan, with a verification multiplication at the end.
  • Systems of linear equations in any number of variables, solved by elimination and classified as unique, inconsistent, or underdetermined.
  • Row echelon and reduced row echelon form, rank, and the pivot and free columns that follow.
  • Null space, column space, and a basis for each, expressed as an explicit set of vectors.
  • Linear independence, span, and dimension, tested rather than asserted.
  • Eigenvalues, eigenvectors, and diagonalisation where the matrix admits it.
  • Matrices of linear transformations, including rotation, reflection, and projection.

Say which notation your course uses for row operations, since and the shorter are marked differently in some schemes. For eigenvectors, ask for normalised answers if unit vectors are required — otherwise any non-zero multiple is equally correct and the one shown may not match the book. And if a system has infinitely many solutions, say whether you want the parametric form or just the dimension of the solution set.

Three problems, worked

Worked example

  1. 1

    Compute the determinant first. If it is zero there is no inverse and the work stops here.

  2. 2

    Apply the 2x2 rule: swap the entries on the leading diagonal, negate the other two, and divide by the determinant.

  3. 3

    A determinant of 1 means no fractions appear, which is rare enough to be worth noticing.

  4. 4

    Verify by multiplying. The top-left entry is 2(4) + 1(−7) = 1 and the top-right is 2(−1) + 1(2) = 0. This check takes fifteen seconds and catches almost every sign error.

Answer

Worked example

  1. 1

    Expand along the first row. The signs alternate plus, minus, plus, following the checkerboard pattern.

  2. 2

    Evaluate the three 2x2 minors separately before combining anything.

  3. 3

    Multiply each by its cofactor sign and coefficient. The second term is minus times minus one, so it contributes plus one times its minor.

  4. 4

    Total the three contributions.

  5. 5

    Check by expanding down the first column instead, where a zero entry removes one minor entirely: 2(−10) + 5(−13) also gives −85. Any row or column gives the same determinant, so pick the one with the most zeros.

Answer

Worked example

  1. 1

    Write the augmented matrix. Each row is an equation, each of the first three columns a variable, and the last column the constants.

  2. 2

    Clear the first column below the pivot with two operations: R2 minus 2R1, and R3 minus R1.

  3. 3

    Swap R2 and R3 so the next pivot is 1 rather than −3. Swapping rows is free and keeps fractions out of the arithmetic.

  4. 4

    Clear the second column below the new pivot with R3 plus 3R2.

  5. 5

    The last row now reads −7z = −21, so back-substitution can begin.

  6. 6

    Substitute upwards: the second row gives y − 6 = −4, and the first gives x + 2 + 3 = 6. Checking all three original equations confirms the triple.

Answer

Check a system against the equations you were handed, never the ones you produced. Substituting into the third original equation gives , which is what it should be. Substituting into the final reduced row would only confirm that your last step agreed with your second-to-last, and a sign error introduced in row two survives that test untouched.

The other two problems carry their checks inside them. A matrix times its claimed inverse must give the identity, which is four multiplications for a 2x2. A determinant can be recomputed along a different row or column and must not change. Eigenvalues have a check of the same shape — they must sum to the trace and multiply to the determinant — which is what lets the next section accept 5 and 2 on sight for a matrix with trace 7 and determinant 10.

Eigenvalues, one step at a time

An eigenvector is a direction the matrix does not turn — it only stretches it, and the stretch factor is the eigenvalue. Everything below follows from that sentence. Attempt each step before revealing it.

Find the eigenvalues and eigenvectors of [[4, 1], [2, 3]]

0 of 6 steps
    Try it yourself first — you'll remember it longer.

    Try your own matrix

    Type any 2x2 matrix below and watch the determinant and inverse update. Set the determinant to zero deliberately — make one row a multiple of the other — and notice that the inverse disappears rather than becoming large. Singularity is not a big number; it is the absence of an answer.

    Determinant and inverse, live

    Matrix A

    Determinant

    (2)(3) − (1)(5) = 1

    Inverse

    1/1 × swap diagonal, negate the other two

    3-1-52

    Where students go wrong

    Assuming multiplication commutes

    and are generally different matrices, and for non-square matrices only one of them may even exist. This is not a quirk: matrices represent transformations, and rotating then reflecting is not the same as reflecting then rotating. Keep the order exactly as written.

    Dividing by a matrix

    There is no matrix division, only multiplication by an inverse, and the side matters. From you get , multiplying on the left of both sides. From you get . Choosing the wrong side gives a different matrix, not a rearranged one.

    Chaining row operations that reference each other

    Applying and in the same pass uses the updated in the second operation, which is not the operation you wrote. Do one at a time, and redraw the matrix between them.

    Losing the cofactor signs on a 3x3 determinant

    The pattern alternates from the top-left: plus, minus, plus along the first row. The middle entry of the top row therefore carries a minus before its minor, and forgetting it changes the determinant without changing its plausibility.

    One line of this inverse is wrong

    One of these lines is wrong. Click it.

    The pattern behind all four is that matrix notation looks like ordinary number notation and refuses to behave like it. Multiplication does not commute, division does not exist, and an operation that is obviously legal on a scalar equation may be meaningless here. Treating the notation as unfamiliar rather than familiar is the right posture for a first course, and writing one operation per line is what makes that posture practical. It also protects the marks, since a grader credits the operations as well as the final matrix — the case made in how method marks are actually allocated.

    Formulas worth knowing cold

    Linear algebra reference

    Tap any formula with a derivation to see where it comes from.

    2x2 essentials

    Determinants and inverses

    Systems and structure

    Practice

    Four to try

    Answers are checked here — nothing is sent anywhere.

    1. 1
    2. 2
    3. 3
    4. 4

    Frequently asked questions

    Is the linear algebra solver free?
    Your first solution is free with no account. A free account then gives three solutions a day, and Gauth Plus removes the limit for $11.99 a month with a three-day free trial.
    Does it show the steps or just the answer?
    Row reductions list every elementary operation in the notation your course uses, such as R2 minus 2R1, with the matrix redrawn after each one. A reduced matrix with no operations attached is not a solution.
    How large a matrix can it handle?
    Ordinary coursework sizes are fine — 2x2 through 5x5 by hand methods. Beyond that the working becomes long enough that reading it stops being useful, so ask for the strategy instead.
    Can it find eigenvalues and eigenvectors?
    Yes, through the characteristic polynomial, with the null space of A minus lambda I solved explicitly for each eigenvalue rather than quoted.
    Will it tell me when a system has no solution?
    Yes, and it names the reason: a row reducing to all zeros with a non-zero constant means inconsistency, while a free column means infinitely many solutions expressed in parametric form.
    Can I ask why a particular row operation was chosen?
    Ask a follow-up on that line. Choosing operations that keep fractions out of the matrix for as long as possible is a skill in itself, and follow-ups do not consume your quota.

    Keep going

    Gauth AIAsk me for any help!