Key takeaways
- det(A) = ad − bc; its absolute value scales area, and its sign records orientation.
- The inverse exists only when det ≠ 0; swap a and d, negate b and c, divide by det.
- Matrix multiplication is not commutative: AB and BA generally differ.
- AX = B has one solution when det ≠ 0; when det = 0 it has none or infinitely many.
- A determinant near zero amplifies rounding error, even when it is not exactly zero.
- Always substitute the answer into both original equations.
What a 2×2 matrix is
A 2×2 matrix is a rectangular array of four numbers arranged in two rows and two columns: A = [[a, b], [c, d]]. The entry in row i and column j is written aij. The identity matrix I = [[1, 0], [0, 1]] leaves every vector unchanged when multiplied, and the zero matrix sends everything to zero.
A matrix can be read as a linear map: it takes an input vector (x, y) and returns (ax + by, cx + dy). The columns of A are the images of the unit vectors (1, 0) and (0, 1), so the matrix is fully described by where it sends those two arrows.
The transpose swaps rows and columns, and the trace adds the diagonal entries. Both appear throughout linear algebra, but the determinant and inverse are the two operations a 2×2 calculator is usually asked for.
The determinant
The determinant of A = [[a, b], [c, d]] is det(A) = ad − bc. For A = [[4, 7], [2, 6]], det(A) = 4 × 6 − 7 × 2 = 24 − 14 = 10.
Geometrically, the determinant is the signed area scale factor of the map. The unit square becomes a parallelogram whose area is |det(A)|. A determinant of 10 means areas grow tenfold; a determinant of 0.5 means they halve. A negative determinant means the map flips orientation, turning a counterclockwise corner into a clockwise one.
A zero determinant collapses the plane onto a line or a point. The two columns become parallel, the matrix loses rank, and no inverse can exist. That geometric picture is why the determinant is the first thing to compute: it answers whether the matrix is invertible before any division happens. For 2×2 matrices, det(AB) = det(A)det(B) and det(Aᵀ) = det(A).
The inverse
If det(A) ≠ 0, the inverse is A⁻¹ = (1/(ad − bc)) [[d, −b], [−c, a]]. Swap the diagonal entries a and d, negate the off-diagonal entries b and c, and divide every entry by the determinant.
For A = [[4, 7], [2, 6]], det(A) = 10, so A⁻¹ = (1/10)[[6, −7], [−2, 4]] = [[0.6, −0.7], [−0.2, 0.4]]. Check it: the top-left entry of A A⁻¹ is 4(0.6) + 7(−0.2) = 2.4 − 1.4 = 1; the top-right is 4(−0.7) + 7(0.4) = 0; the bottom row gives 0 and 1. The product is I.
Two useful facts follow: det(A⁻¹) = 1/det(A), and (AB)⁻¹ = B⁻¹A⁻¹, with the order reversed. Reversal is not a typo; it is forced by the requirement that B⁻¹A⁻¹ times AB returns the identity.
Multiplication and why order matters
To multiply A by B, take the dot product of each row of A with each column of B. For A = [[1, 2], [3, 4]] and B = [[0, 1], [1, 0]], AB = [[2, 1], [4, 3]] while BA = [[3, 4], [1, 2]]. The two products differ, so matrix multiplication is not commutative.
The reason is composition order. Applying B and then A is generally not the same as applying A and then B: rotate then reflect is not reflect then rotate. Matrix multiplication composes maps from right to left, which is why AB means “apply B first.”
Multiplication is associative, (AB)C = A(BC), and distributive over addition. Those properties make matrices a ring, but the missing commutative law is the one that trips up hand calculations. Keep the order written down, especially when an inverse is involved: AX = B is solved by left-multiplying both sides by A⁻¹, giving X = A⁻¹B, not BA⁻¹.
Solving a system with the inverse
Write the system as AX = B. For 2x + 3y = 13 and 4x − y = 5, the coefficient matrix is A = [[2, 3], [4, −1]], the variable vector is X = [x, y], and B = [13, 5].
det(A) = 2(−1) − 3(4) = −2 − 12 = −14, which is nonzero, so the inverse exists: A⁻¹ = (1/−14)[[−1, −3], [−4, 2]] = [[1/14, 3/14], [2/7, −1/7]]. Then X = A⁻¹B gives x = (13 + 15)/14 = 2 and y = (26 − 5)/7 = 3.
Check both original equations: 2(2) + 3(3) = 13 and 4(2) − 3 = 5. The inverse method is clean when the inverse is already known or when many right-hand sides share the same A. For a single 2×2 system, substitution or elimination is usually faster by hand.
Cramer’s rule
Cramer’s rule expresses each variable as a ratio of determinants. With D = det(A), x = det(Ax) / D and y = det(Ay) / D, where Ax replaces the first column of A with B, and Ay replaces the second column.
For the same system, D = −14. Ax = [[13, 3], [5, −1]] has determinant 13(−1) − 3(5) = −13 − 15 = −28, so x = −28/−14 = 2. Ay = [[2, 13], [4, 5]] has determinant 2(5) − 13(4) = 10 − 52 = −42, so y = −42/−14 = 3.
The rule is memorable and generalizes to larger systems, but the determinant count grows factorially. For 2×2, it is a compact alternative to elimination; for 3×3 and beyond, row reduction is usually less error-prone. The rule also shows immediately why D = 0 is special: the formulas divide by D.
Singular matrices and the three cases
When det(A) = 0, the matrix is singular and A⁻¹ does not exist. The two equations are then either dependent or inconsistent. Take A = [[2, 4], [1, 2]], where det(A) = 2(2) − 4(1) = 0.
If B = [6, 3], the equations 2x + 4y = 6 and x + 2y = 3 are the same line, so every point on it solves the system: infinitely many solutions. If B = [7, 3], the equations 2x + 4y = 7 and x + 2y = 3 are parallel and distinct: no solution.
A quick consistency test compares the ratios. For a1x + b1y = c1 and a2x + b2y = c2, if a1/a2 = b1/b2 = c1/c2 the lines coincide; if the coefficient ratios match but the constant ratio does not, the lines are parallel. Geometrically, a singular matrix maps the whole plane onto a line, so distinct inputs can share an output.
Geometry, eigenvalues, and applications
The determinant and inverse describe transformations before they describe equations. A rotation by θ is R = [[cos θ, −sin θ], [sin θ, cos θ]], with det(R) = cos²θ + sin²θ = 1: rotations preserve area and orientation. A reflection such as [[1, 0], [0, −1]] has determinant −1, which records the flip. A scaling [[k, 0], [0, k]] has determinant k², so areas scale by k².
The trace and determinant also encode the eigenvalues. For a 2×2 matrix, the characteristic equation is λ² − tr(A)λ + det(A) = 0, so the eigenvalues sum to the trace and multiply to the determinant.
Applications follow: computer graphics composes rotations and scalings as matrices, least-squares fitting solves normal equations, and Markov chains use transition matrices.
Common mistakes and numerical caveats
- Sign errors in the inverse: negate b and c, but keep a and d in place.
- Dividing by the determinant before checking that it is nonzero.
- Multiplying in the wrong order: the solution is A⁻¹B, not BA⁻¹.
- Confusing the determinant ad − bc with the trace a + d.
- Assuming AB = BA; most pairs do not commute.
- Rounding the inverse too early and then checking with the rounded result.
Numerical conditioning deserves its own warning. A determinant can be tiny without being zero. For A = [[1, 1], [1, 1.0001]], det(A) = 0.0001, and the inverse entries are around 10,000. A change of 0.0001 in an input can move the solution by roughly 1, so the answer is sensitive to every digit. That ill-conditioning is a property of the matrix, not a calculator bug.
When det is exactly zero, stop: report that the matrix is singular and classify the system as inconsistent or dependent. When det is small, keep extra precision, use exact fractions where possible, and substitute the final answer into both equations.
Frequently asked questions
How do you find the inverse of a 2×2 matrix?
Swap a and d, negate b and c, and divide each entry by ad − bc, provided the determinant is nonzero.
What does a determinant of zero mean?
The matrix is singular and has no inverse; the corresponding lines are parallel or coincident, so there is no unique solution.
Is matrix multiplication commutative?
No. For A = [[1, 2], [3, 4]] and B = [[0, 1], [1, 0]], AB ≠ BA.
How do you solve a system with matrices?
Write AX = B, check that det(A) ≠ 0, then compute X = A⁻¹B or use Cramer’s rule.
Can a non-square matrix have an inverse?
No. An inverse requires the same number of rows and columns and a nonzero determinant.
What is the determinant of a rotation matrix?
1, because rotations preserve area and orientation.
Further reading