The formula
Determinant (2 × 2): det [a b; c d] = ad − bc
Inverse: A⁻¹ found by row-reducing [A | I] to [I | A⁻¹]; it exists only if det A ≠ 0
Product: (AB)ᵢⱼ = Σₖ Aᵢₖ Bₖⱼ, defined when A's columns = B's rows
Transpose: (Aᵀ)ᵢⱼ = Aⱼᵢ; trace = sum of the diagonal
2 × 2 eigenvalues: λ = (tr ± √(tr² − 4 det)) ÷ 2
Worked example
- A = [2 1 1; 1 3 2; 1 0 0].
- Expanding along the bottom row: det A = 1 × (1×2 − 1×3) = −1.
- Row-reducing [A | I] gives A⁻¹ = [0 0 1; −2 1 3; 3 −1 −5].
- Check: A × A⁻¹ = I. The trace is 2 + 3 + 0 = 5 and the rank is 3.
What a matrix calculator does
A matrix is a rectangular grid of numbers arranged in rows and columns. Matrices represent systems of equations, geometric transformations such as rotations and scaling, networks, Markov chains, images and the weights inside machine learning models. This calculator handles the most common operations: determinants, inverses, transposes, reduced row echelon form, powers, eigenvalues of 2 × 2 matrices and the addition, subtraction and multiplication of two matrices. Enter each row with spaces between numbers and semicolons between rows, so "1 2; 3 4" is a 2 × 2 matrix.
Determinants
The determinant is a single number calculated from a square matrix. For a 2 × 2 matrix [a b; c d], it's ad − bc. Geometrically, it's the factor by which the matrix scales areas (or volumes in 3D), with a negative sign when it flips orientation. A determinant of zero means the matrix squashes space into a lower dimension, so it has no inverse and the corresponding system of equations doesn't have a unique solution. The calculator finds determinants of any size by row reduction, which is much faster than cofactor expansion for large matrices.
Inverse matrices
The inverse A⁻¹ undoes the effect of A, so A × A⁻¹ equals the identity matrix. For a 2 × 2 matrix, the inverse is 1/(ad − bc) × [d −b; −c a]. For larger matrices, the calculator places A next to the identity matrix and row-reduces until A becomes the identity, at which point the other half has become A⁻¹. Inverses solve systems of equations (x = A⁻¹b), although in practice our linear equation solver uses elimination directly, which is faster and more accurate.
Matrix multiplication
To multiply A by B, each entry of the result is the dot product of a row of A with a column of B. That only works when A has as many columns as B has rows: a 2 × 3 matrix times a 3 × 2 matrix gives a 2 × 2 result. Matrix multiplication isn't commutative, so A × B usually differs from B × A, and one may exist when the other doesn't. Multiplication represents applying one transformation after another, which is why 3D graphics engines chain rotation, scaling and translation matrices together.
Rank, RREF and eigenvalues
Reduced row echelon form is the simplest form a matrix can be row-reduced to, with a leading 1 in each non-zero row and zeros above and below it. The number of non-zero rows is the rank, which counts how many rows or columns are linearly independent. Eigenvalues are the special scaling factors λ for which Av = λv has a non-zero solution v; they describe stability in physics and engineering, the long-run behaviour of Markov chains, and the principal components used in data analysis.
Tips for accurate results
The calculator works in double-precision floating point, so results such as 0.333333 may appear where an exact fraction would be 1/3, and values that should be zero can appear as tiny numbers like 1e-16, which are shown as 0. Matrices that are nearly singular, with a determinant very close to zero, magnify rounding errors, so treat their inverses with caution. For exact fraction answers to equation systems, use the equation solver; for general arithmetic, the scientific calculator handles powers, roots and trigonometry.