Matrix Calculator
Add, multiply, find determinants and inverses, row-reduce, solve linear systems, and compute eigenvalues - type matrices with a true math editor and see every step worked out.
What this tool covers
A matrix is a rectangular grid of numbers used to represent linear systems, transformations, and data. This tool covers the core operations of linear algebra: arithmetic (addition, scalar multiplication, matrix multiplication), determinants and inverses, row reduction for solving systems of equations, and eigenvalues for understanding how a matrix stretches or rotates space.
Basic operations
Addition / Subtraction
\((A \pm B)_{ij} = A_{ij} \pm B_{ij}\)
Scalar Multiplication
\((kA)_{ij} = k \cdot A_{ij}\)
Matrix Multiplication
\((AB)_{ij} = \sum_k A_{ik}B_{kj}\)
Transpose
\((A^T)_{ij} = A_{ji}\)
Determinant
The determinant is a single number that captures how a matrix scales area (in 2D) or volume (in 3D and beyond). A determinant of zero means the matrix is singular — it collapses space into a lower dimension and has no inverse.
For larger matrices, this tool uses cofactor expansion: expanding along the first row, multiplying each entry by the determinant of its minor (the matrix left after deleting that entry's row and column), with alternating signs.
Inverse and row reduction
The inverse \(A^{-1}\) of a square matrix satisfies \(AA^{-1} = I\), the identity matrix. This tool finds it by augmenting \(A\) with the identity matrix, \([A \mid I]\), and applying row operations until the left side becomes \(I\) — at which point the right side has become \(A^{-1}\).
| Row operation | What it does |
|---|---|
| Row swap | Exchange two rows — used to bring a nonzero entry into the pivot position |
| Row scaling | Multiply a row by a nonzero constant — used to make a pivot equal to 1 |
| Row elimination | Add a multiple of one row to another — used to clear entries above or below a pivot |
Applying these operations until every pivot is 1 and every other entry in a pivot column is 0 produces the Reduced Row Echelon Form (RREF) — the same process this tool uses to solve systems of linear equations \(Ax = b\).
Eigenvalues and eigenvectors
An eigenvector of a matrix \(A\) is a nonzero vector \(v\) that only gets scaled (not rotated) when multiplied by \(A\). The scaling factor is its eigenvalue \(\lambda\):
Eigenvalues are found by solving the characteristic equation \(\det(A - \lambda I) = 0\). For a 2×2 matrix this is a quadratic in \(\lambda\), solvable exactly — including cases with a complex-conjugate pair of eigenvalues, which correspond to a rotation component in the transformation. For 3×3 matrices, this tool solves the resulting cubic numerically.
Using the calculator
- Choose an operationPick from the sidebar: Add/Subtract, Scalar Multiply, Multiply, Determinant, Inverse, RREF, Solve System, or Eigenvalues. Each mode shows only the matrix fields it needs.
- Set the matrix sizeUse the row/column dropdowns to size each matrix before entering values.
- Type your matrix using the math editorClick into a matrix field and type values separated by Tab between cells — the editor automatically keeps everything aligned in a proper grid.
- Add or remove rows and columnsRight-click (or Ctrl+click) inside the matrix field for a menu to insert or delete rows and columns on the fly.
- Press CalculateThe result appears immediately, with every row operation or expansion step shown underneath in order.
- Try an example chipIf you're not sure what to type, click any example below the matrix fields to load a ready-made problem for the current mode.
Entering matrices
The math field uses MathLive's built-in matrix editor. Type a number, press Tab to move to the next cell, and the grid expands as needed. You can also use the on-screen keyboard's matrix button to insert a properly-sized grid to fill in.
| Action | How |
|---|---|
| Move between cells | Tab or arrow keys |
| New row | Enter at the end of a row, or right-click → Add Row |
| Add/remove rows or columns | Right-click (or Ctrl+click) inside the matrix for the context menu |
| Negative numbers | Type the minus sign directly, e.g. -3 |
| Decimals | Type a decimal point directly, e.g. 0.5 |
Reading the step-by-step trace
For row reduction (used in Inverse, RREF, and Solve System), each step shows the specific row operation applied and the resulting matrix at that point — so you can follow the elimination process exactly. For determinants of 3×3 and larger, the trace shows the cofactor expansion: each entry of the first row, its sign, and the determinant of its minor.
Suggested classroom uses
- Verify hand calculations. Row-reduce a system by hand, then check your work against the trace step by step.
- Explore singular matrices. Try inverting a matrix with linearly dependent rows and discuss why the determinant is zero and no inverse exists.
- Connect determinant to area. Use a 2×2 matrix's columns as vectors and discuss how the determinant's absolute value equals the area of the parallelogram they span.
- Visualize eigenvectors. Try a rotation matrix like \(\begin{bmatrix}0 & -1 \\ 1 & 0\end{bmatrix}\) and discuss why its eigenvalues are complex — a pure rotation has no real direction that only stretches.
Add or subtract matrices
\(A \pm B\)Right-click (or Ctrl+click) inside a matrix field to add or remove rows and columns.
