On this page
How to use the matrix calculator
- Set the rows and columns of A with the two drop-downs (1 to 6 each), then type the entries. Use B for A + B, A - B, A × B and the right-hand side of a system.
- Press an operation:
det(A),A⁻¹,RREF(A), transpose, rank, eigenvalues,Aⁿ(set n from -20 to 50), orSolve A·x = B. - For RREF, the inverse and Solve, open the "Row operations" list under the result. Every step is shown with the matrix after it.
| You type | Example | What happens |
|---|---|---|
| Whole number | -4 | Exact fraction arithmetic |
| Decimal | 0.25 | Read as 1/4, still exact |
| Fraction | 2/3 | Kept as 2/3, never rounded |
| Irrational | sqrt(2), pi | Whole calculation switches to decimals |
To solve a system, put the coefficients in A and the right-hand sides in B as one column. A 3-equation system needs A as 3 × 3 and B as 3 × 1.
What RREF, rank, determinant, inverse and eigenvalues tell you
Row reduction rewrites a matrix using three legal moves: swap two rows, multiply a row by a nonzero number, add a multiple of one row to another. These moves never change the solutions of a system. RREF (reduced row echelon form) is the end of the road: each pivot is 1, and it is the only nonzero entry in its column.
The rank is the number of pivots. It counts how many equations carry independent information. The determinant of a square matrix is one number, and it is zero exactly when the rows are dependent. For a 2 × 2 matrix it is ad - bc. The inverse A⁻¹ satisfies A·A⁻¹ = I and exists only when the determinant is not zero. The tool finds it by row-reducing [A | I] until the left half becomes I.
An eigenvalue λ of A is a number for which A·v = λ·v has a nonzero solution v. Eigenvalues are the roots of det(A - λI) = 0. Their sum is the trace (the diagonal total) and their product is the determinant, which is a handy check.
One, none or infinitely many solutions
Row-reduce the augmented matrix [A | b] and read the pivots. Three examples, all from the tool:
| System | RREF of [A | b] | Pivots | Verdict |
|---|---|---|---|
x + 2y = 3, 2x - y = 1 | [1 0 | 1], [0 1 | 1] | 2 of 2 unknowns | One solution: x = 1, y = 1 (det = -5) |
x + 2y = 3, 2x + 4y = 6 | [1 2 | 3], [0 0 | 0] | 1 of 2 unknowns | Infinitely many: one free variable |
x + 2y = 3, 2x + 4y = 7 | [1 2 | 0], [0 0 | 1] | Pivot in the b column | None: the last row says 0 = 1 |
A pivot in every unknown column and none in the b column means exactly one solution. A pivot in the b column means none. Fewer pivots than unknowns, with a consistent b, means infinitely many.
Three worked examples
1. Mesh currents in a three-loop circuit, solved by RREF
Take clockwise currents I₁, I₂, I₃ in amps. Loop 1 has 6 Ω of its own, shares 2 Ω with loop 2, and has a 12 V source. Loop 2 has 4 Ω of its own and shares 3 Ω with loop 3. Loop 3 has 5 Ω of its own and a 6 V source working against its current. Kirchhoff's voltage law gives:
8·I₁ - 2·I₂ = 12-2·I₁ + 9·I₂ - 3·I₃ = 0-3·I₂ + 8·I₃ = -6
Enter the coefficients in A, the column 12, 0, -6 in B, and press Solve. The determinant of A is 472, so the answer is unique. The tool's 8 row operations:
- R1 → R1 ÷ 8, giving [1, -1/4, 0 | 3/2]
- R2 → R2 + 2·R1, giving [0, 17/2, -3 | 3]
- R2 → R2 ÷ (17/2), giving [0, 1, -6/17 | 6/17]
- R1 → R1 + (1/4)·R2, giving [1, 0, -3/34 | 27/17]
- R3 → R3 + 3·R2, giving [0, 0, 118/17 | -84/17]
- R3 → R3 ÷ (118/17), giving [0, 0, 1 | -42/59]
- R1 → R1 + (3/34)·R3, giving [1, 0, 0 | 90/59]
- R2 → R2 + (6/17)·R3, giving [0, 1, 0 | 6/59]
So I₁ = 90/59 ≈ 1.5254 A, I₂ = 6/59 ≈ 0.1017 A and I₃ = -42/59 ≈ -0.7119 A. The negative sign means loop 3 actually runs counterclockwise. Substituting the fractions back gives exactly 12, 0 and -6. For more on this method see simultaneous equations with matrices.
2. A 3 × 3 inverse with fractions
Let A = [[2, 1, 0], [1, 3, 1], [0, 1, 2]]. This tridiagonal pattern turns up in chains of springs and ladder networks. By hand, det(A) = 2(6 - 1) - 1(2 - 0) = 8, which the tool confirms. Row-reducing [A | I] takes 8 operations; the first three are R1 ÷ 2, R2 - R1, and R2 ÷ (5/2). The result is:
A⁻¹ = [[5/8, -1/4, 1/8], [-1/4, 1/2, -1/4], [1/8, -1/4, 5/8]]
Multiplying A by this matrix returns the identity exactly. Now A·x = (1, 2, 3) is one multiplication: x = A⁻¹·b = (1/2, 0, 3/2). The numeric eigenvalues of A are 1, 2 and 4, and their product is 8, matching the determinant.
3. Eigenvalues of a symmetric 2 × 2 stress matrix
A plane stress state in MPa is S = [[60, 20], [20, 40]], with 60 and 40 as normal stresses and 20 as shear. The characteristic equation is λ² - 100λ + 2000 = 0, since the trace is 100 and the determinant is 2000. The tool returns:
- λ = 72.36068 with unit eigenvector (0.850651, 0.525731)
- λ = 27.63932 with unit eigenvector (-0.525731, 0.850651)
These are the principal stresses, 50 ± 10√5 MPa. The eigenvectors give their directions: the larger one sits 31.72° from the first axis, and the two are perpendicular. This is not luck. A real symmetric matrix always has real eigenvalues and perpendicular eigenvectors.
Reading the result and common mistakes
Why exact fractions matter. The matrix [[1, 1/3], [1/3, 1]] has determinant 8/9 and inverse [[9/8, -3/8], [-3/8, 9/8]]. The tool keeps 1/3 as 1/3 through every step, so A times that inverse is exactly the identity. Rounded decimals can also hide a zero: a pivot that should be 0 may come out as a tiny nonzero number, and the rank is then wrong. Fractions remove that risk.
- Singular matrix.
[[1,2,3],[4,5,6],[7,8,9]]has determinant 0 and rank 2, so it has no inverse. The tool reports this plainly. - Wrong shape. Determinant, inverse, eigenvalues and powers need a square matrix. A × B needs the columns of A to equal the rows of B, and A × B is usually not B × A.
- Irrational entries. One
sqrt(2)turns the whole run into decimals, so you lose exact fractions. - Eigenvalues are numeric. They are decimals to about 10 digits, and complex eigenvalues are shown as a + bi without eigenvectors.
In a mesh system, a flipped sign on a shared resistor is the usual culprit. If the numbers look off, re-check the off-diagonal entries first.
Frequently asked questions
How do I solve a system of equations with a matrix?
Put the coefficients in A and the constants in B as one column, then press Solve A·x = B. The tool row-reduces [A | B] and tells you whether the system has one solution, none or infinitely many, with every row operation listed.
What does it mean when the determinant is 0?
The matrix is singular: its rows are dependent, it has no inverse, and A·x = b has either no solution or infinitely many. The rank will be lower than the matrix size.
Why does the answer show fractions instead of decimals?
When every entry is a whole number, decimal or fraction, the calculator uses exact arithmetic, so 1/3 stays 1/3. Type an irrational entry such as sqrt(2) and the result switches to decimals.
What is the largest matrix I can enter?
Up to 6 × 6 for both A and B, with rows and columns set separately. Some handheld calculators stop at 4 × 4, so 5 × 5 and 6 × 6 systems are where this helps.
Does it give eigenvectors as well as eigenvalues?
Yes, when the eigenvalues are real, it lists unit-length eigenvectors next to them. Any nonzero multiple of an eigenvector also works. For complex eigenvalues only the values are shown.
Are the row-reduction steps free?
Yes. RREF, the inverse and Solve all list every row operation with the matrix after each step, and there is nothing to unlock.