Calculate matrix inverse, determinant, multiplication, power, rank, RREF, LU, QR and eigenvalues online, with exact fractions such as 1/3 instead of rounded decimals. Type or paste matrices into spreadsheet grids straight from Excel or Google Sheets, solve AX = B, and copy or download the result.
Enter one or two matrices in spreadsheet-style grids and pick an operation. The result appears immediately as another grid that you can copy back into Excel, reuse as the next input, or download as CSV. Calculations are exact by default: the inverse of [[2, 1], [1, 3]] is shown as 3/5, -1/5, -1/5, 2/5, not 0.6, -0.2, … with rounding errors.
The matrix is read from A1 to the last filled row and column, and empty cells inside it count as 0, so sparse matrices are quick to enter. Numbers can be integers, decimals (-0.25), fractions (2/3) or exponents (1.5e-3).
| Operation | What it calculates |
|---|---|
| A + B, A − B | Element-wise sum and difference of two matrices of the same size |
| A × B, B × A | Matrix product (the number of columns of the left matrix must equal the rows of the right one) |
| A ∘ B | Hadamard (element-wise) product |
| A ⊗ B | Kronecker product |
| Solve AX = B | Solution of the linear system, X = A⁻¹B, for a square, non-singular A; B can have several columns |
| det(A) | Determinant |
| A⁻¹ | Inverse matrix |
| Aᵀ | Transpose |
| Aⁿ | Integer power; negative n uses the inverse, and n = 0 gives the identity |
| k·A | Multiplication by a scalar k (fractions allowed) |
| tr(A) | Trace (sum of the diagonal) |
| rank(A) | Rank |
| RREF(A) | Reduced row echelon form, with the pivot columns |
| LU | LU decomposition with partial pivoting, PA = LU |
| QR | QR decomposition, A = QR |
| Eigenvalues | Eigenvalues (real or complex) and eigenvectors |
| A⁺ | Moore–Penrose pseudo-inverse, also for singular and non-square matrices |
QR, eigenvalues and the pseudo-inverse generally involve square roots, so they are always calculated with decimals.
Enter the matrix as Matrix A and choose A⁻¹. If the determinant is 0, the matrix is singular and has no inverse; the calculator says so and you can use the pseudo-inverse A⁺ instead.
Write the coefficients as Matrix A and the right-hand side as a single column in Matrix B, then choose Solve AX = B. For example, 2x + y = 1 and x + 3y = 2 give A = [[2, 1], [1, 3]], B = [[1], [2]] and the solution x = 1/5, y = 3/5. If A is singular, use RREF on the augmented matrix to see whether there are no solutions or infinitely many.
Fraction mode calculates with exact rational numbers, so results such as 1/3 are not rounded. Switch to Decimal to see decimal numbers.
Yes. Copy the cells in Excel, Google Sheets or Numbers, click A1 of the grid and paste. The result can be copied back the same way.
There is no fixed limit, but exact calculations on large matrices (for example 30 × 30 and larger) can take a while; use Decimal mode for big matrices.