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}\)

Dimensions matter Addition and subtraction require matrices of the same size. Multiplication AB requires the number of columns in A to match the number of rows in B — the result has the same number of rows as A and columns as B.

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.

\(\det\begin{bmatrix}a & b \\ c & d\end{bmatrix} = ad - bc\) 2×2 determinant

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.

\(\det(A) = \sum_{j} (-1)^{1+j} \, a_{1j} \, \det(M_{1j})\) cofactor expansion along row 1

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 operationWhat it does
Row swapExchange two rows — used to bring a nonzero entry into the pivot position
Row scalingMultiply a row by a nonzero constant — used to make a pivot equal to 1
Row eliminationAdd 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\).

A matrix has no inverse if its determinant is zero Singular matrices represent transformations that lose information — multiple inputs map to the same output, so there's no way to reverse the process.

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\):

\(Av = \lambda v\) v is an eigenvector, λ is its eigenvalue

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.

Geometric intuition Eigenvalues describe the "natural stretch directions" of a transformation. A matrix with eigenvalues 3 and 0.5 stretches space by 3× along one direction and shrinks it by half along another — eigenvectors point along those directions.

Using the calculator

  1. 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.
  2. Set the matrix sizeUse the row/column dropdowns to size each matrix before entering values.
  3. 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.
  4. 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.
  5. Press CalculateThe result appears immediately, with every row operation or expansion step shown underneath in order.
  6. 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.

ActionHow
Move between cellsTab or arrow keys
New rowEnter at the end of a row, or right-click → Add Row
Add/remove rows or columnsRight-click (or Ctrl+click) inside the matrix for the context menu
Negative numbersType the minus sign directly, e.g. -3
DecimalsType 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.

Tip for studying Try predicting the next row operation before revealing it — ask yourself which entry needs to become 0 or 1 next, and which row you'd use to do it.

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\)
\begin{pmatrix}1&2\\3&4\end{pmatrix}
\begin{pmatrix}5&6\\7&8\end{pmatrix}

Right-click (or Ctrl+click) inside a matrix field to add or remove rows and columns.

Quick try

Result

Enter matrices and press Calculate to see the result here.