Compute the determinant, inverse, transpose, rank and eigenvalues of a 2×2 or 3×3 matrix, and add, subtract or multiply two matrices. Free, runs in your browser.

RT-MAT-023 · Mathematics
Your browser is too old for this tool’s interactive features. Please update to Safari 13.1, Chrome or Edge 80, Firefox 74 or newer.

Matrix Calculator

Advertisement
After tool · AD-W1Responsive · Post-tool

How to Use the Matrix Calculator

Pick a size

Choose 2×2 or 3×3. The input grids for matrices A and B resize to match, pre-filled with an example you can overwrite.

Enter your numbers

Type a value into each cell. Decimals and negatives are fine; blank cells are read as zero. Results update the moment you type.

Read A's properties

The calculator shows the determinant, trace, rank and eigenvalues of A, along with its transpose and inverse — or a note if A is singular and has no inverse.

Combine with B

It also shows A + B, A − B and the matrix product A × B, so you can check arithmetic between the two matrices at a glance.

Advertisement
After how-to · AD-W2Responsive

Matrices: The Language of Linear Algebra

More Than a Grid of Numbers

A matrix is a rectangular array of numbers, but its real meaning is as a transformation: a rule that takes vectors and stretches, rotates, shears, or projects them. Multiplying a vector by a matrix moves it to a new place, and multiplying two matrices composes their transformations into one. This single idea — that a grid of numbers encodes a geometric operation — is what makes linear algebra the backbone of computer graphics, machine learning, physics, engineering, economics, and statistics. This calculator works with the two sizes you meet most often, 2×2 and 3×3, and computes the quantities that describe what a matrix does. The determinant tells you how much the transformation scales areas or volumes, and whether it flips orientation; a determinant of zero means the matrix squashes space into a lower dimension and cannot be undone. The trace, the sum of the diagonal, and the rank, the number of independent directions the matrix actually uses, round out the picture, and the inverse — when it exists — is the transformation that exactly reverses A.

The most revealing numbers a matrix carries are its eigenvalues. An eigenvalue is a special scaling factor: a direction the matrix merely stretches without rotating, and the eigenvalue is how much it stretches by along that direction. Eigenvalues explain the long-term behaviour of dynamic systems, the natural frequencies at which a structure vibrates, the principal axes of a dataset in statistics, and the stability of everything from ecosystems to control systems. The page Rank, PageRank, that once organised the web is an eigenvalue computation; so is the way a recommendation engine finds hidden structure in your preferences. This calculator finds the eigenvalues exactly where it can — solving the characteristic quadratic for a 2×2 matrix and the characteristic cubic for a 3×3 — and reports complex eigenvalues honestly when a transformation includes a rotation, since a pure rotation has no real direction it leaves fixed. Everything is computed in your browser with a small, deterministic engine; nothing is uploaded.

"A matrix is a verb, not a noun — it does something to space. Its determinant measures how it scales, and its eigenvalues reveal the directions it leaves pointing the same way."

Where Matrices Show Up

Matrices are everywhere once you start looking. Every rotation, scaling and translation in a video game or 3D model is a matrix multiplication, applied millions of times a second by the graphics hardware. Solving a system of linear equations — balancing a chemical reaction, fitting a line to data, distributing current through a circuit — is matrix algebra, and the inverse this calculator computes is precisely the tool that solves such systems. In machine learning, the weights of a neural network are matrices, and training is a long sequence of matrix operations; in statistics, the covariance matrix and its eigenvalues drive principal component analysis, the standard technique for finding the most important patterns in high-dimensional data. Even Google's original search ranking, Markov chains modelling weather or web traffic, and the quantum states of physics are all expressed as matrices and their eigenvalues. Whether you are studying linear algebra, checking homework, or just want to see the determinant, inverse and eigenvalues of a matrix at a glance, this calculator gives you the full picture instantly and privately.

A zero determinant means the transformation flattened space

01

A matrix is best read as a transformation of space, not just a grid.

02

The determinant measures how a matrix scales area or volume.

03

A zero determinant means the matrix is singular and has no inverse.

04

Eigenvalues are the scaling factors along directions a matrix doesn't rotate.

05

A pure rotation has complex eigenvalues — no real fixed direction.

06

Matrix multiplication is not commutative: A×B ≠ B×A in general.

07

The trace equals the sum of the eigenvalues.

08

3D graphics apply matrix multiplications millions of times per second.

09

Google's PageRank is, at heart, an eigenvalue computation.

10

A quarter-turn, [[0, −1], [1, 0]], has eigenvalues +i and −i — enter it above and the calculator prints them rather than reporting "none".

📅 Research current as of 13 Sep 2026 · Sources: Strang, Introduction to Linear Algebra, 5th ed. (2016); Press et al., Numerical Recipes, 3rd ed. (2007) §2.1 Gauss–Jordan and §5.6 cubic roots; Golub and Van Loan, Matrix Computations, 4th ed. (2013)
Standards, published formulas, and reference data are revised over time — check against a current authoritative source before relying on these figures.

Frequently Asked Questions

  • It works with 2×2 and 3×3 square matrices — the two sizes that cover the great majority of hand calculations and coursework. Choose the size at the top and the input grids for both A and B resize to match.
  • The determinant measures how much the matrix scales area (in 2D) or volume (in 3D), and its sign tells you whether the transformation flips orientation. A determinant of zero means the matrix collapses space into a lower dimension — it is singular and has no inverse.
  • An eigenvalue is a special scaling factor: along certain directions, a matrix only stretches a vector without changing its direction, and the eigenvalue is how much it stretches by. Eigenvalues reveal a matrix's deepest behaviour and appear throughout physics, statistics and machine learning.
  • When a transformation includes a rotation, there is no real direction it leaves pointing the same way, so its eigenvalues come out as complex numbers (a pair of conjugates). This is correct and meaningful — the imaginary part encodes the rotation. The calculator reports them honestly rather than hiding them.
  • A matrix has no inverse exactly when its determinant is zero — it is then called singular. Geometrically it squashes space into a lower dimension, losing information that cannot be recovered, so no reversing transformation exists. The calculator shows a clear note in that case.
  • Usually not. Matrix multiplication is not commutative: the order matters, because applying transformation A then B is generally different from B then A. The calculator shows A × B; swap the values in the two grids if you want B × A.
  • The rank is the number of independent directions the matrix actually uses — the dimension of its output space. A full-rank matrix preserves dimension and is invertible; a lower rank means rows or columns are redundant and the matrix is singular.
  • No. Every calculation runs in your browser with a small built-in engine — nothing is uploaded to a server or third-party library, and the tool works offline once the page has loaded.
  • Yes. Each cell accepts decimals and negatives, and any blank cell is treated as zero. The results recalculate instantly as you type.
  • The determinant is computed by cofactor (Laplace) expansion along the first row — exact for a 2×2 and a 3×3. The inverse comes from Gauss–Jordan elimination on the augmented matrix [A | I], and the rank is the number of non-zero rows in the reduced row-echelon form, with entries smaller than 10⁻⁹ treated as zero. Eigenvalues are the roots of the characteristic polynomial: the quadratic formula for a 2×2 matrix, and for a 3×3 the cubic is solved exactly with Cardano's formula (one real root and a complex pair) or the trigonometric method (three real roots). All arithmetic is IEEE 754 double precision and results are displayed to 8 significant figures; a determinant with magnitude below 10⁻¹² is reported as singular. That last test is absolute rather than scaled to the size of your entries, so a matrix built from very small numbers — every cell around 10⁻⁷, say — can be flagged singular even though it is perfectly invertible. If the rank shown is full but the inverse says singular, that is what has happened: multiply every cell by a constant, invert, and divide the result back.

Method & sources

How it computes

For a 2×2 or 3×3 matrix A: determinant by cofactor (Laplace) expansion along the first row; trace as the sum of the diagonal; rank as the number of non-zero rows of the reduced row-echelon form; inverse by Gauss–Jordan elimination on the augmented matrix [A | I], refused when |det A| < 10⁻¹²; eigenvalues as the roots of the characteristic polynomial det(A − λI) = 0 —

What this tool implements

  • Cofactor expansion for the determinant, Gauss–Jordan elimination for the inverse and reduced row-echelon form for the rank, as set out in Strang, Introduction to Linear Algebra, 5th ed., Chapters 2 and 5 — the hand methods a reader checking coursework is using, not an LU or QR factorisation.
  • Eigenvalues from the characteristic polynomial in closed form rather than by iteration: λ² − (tr A)λ + det A = 0 at 2×2, and λ³ − (tr A)λ² + c₂λ − det A = 0 at 3×3 solved by Cardano or the trigonometric method (Numerical Recipes 3rd ed. §5.6). Complex conjugate pairs are reported as complex numbers, not suppressed.
  • Thresholds are absolute, not scaled to the matrix: a pivot below 10⁻¹² is skipped, a row counts as non-zero for rank if any entry exceeds 10⁻⁹, and the inverse is refused when |det A| < 10⁻¹². All arithmetic is IEEE 754 binary64 and every figure is displayed to 8 significant figures.
  • Square matrices of order 2 and 3 only; A and B must be the same size, blank cells read as zero, and no eigenvectors, LU/QR decomposition, condition number or pseudo-inverse is offered.
  • the quadratic formula at 2×2, and at 3×3 Cardano's formula (one real root plus a conjugate pair) or the trigonometric form (three real roots). Also A + B, A − B and the product A × B.

Sources

  • Strang G. Introduction to Linear Algebra. 5th ed. Wellesley, MA: Wellesley-Cambridge Press; 2016. Chapter 2 (elimination and the inverse by Gauss–Jordan on [A | I]), Chapter 5 (determinants and cofactor expansion), Chapter 6 (eigenvalues from det(A − λI) = 0).
  • Golub GH, Van Loan CF. Matrix Computations. 4th ed. Baltimore: Johns Hopkins University Press; 2013. §3.2–3.4 Gaussian elimination and pivoting, §7.1 the characteristic polynomial and why iterative methods are preferred at larger orders.
  • Press WH, Teukolsky SA, Vetterling WT, Flannery BP. Numerical Recipes: The Art of Scientific Computing. 3rd ed. Cambridge: Cambridge University Press; 2007. §2.1 Gauss–Jordan elimination; §5.6 Quadratic and cubic equations (Cardano and the trigonometric form).
  • IEEE Std 754-2019, IEEE Standard for Floating-Point Arithmetic. New York: IEEE; 2019. https://standards.ieee.org/ieee/754/6210/

What can make this go out of date

  • None at runtime — every result is computed from the cells the reader types; no table or published series is consulted.
Advertisement
Pre-footer · AD-W3 728 × 90