Two diagonal products
Every square matrix has a single number called its determinant. For a 2 × 2 matrix (a b; c d), the determinant is ad − bc: the product down the main diagonal, from top left to bottom right, minus the product along the other diagonal. It is written det A, or |A|.
For A = (4 2; 5 3), the main diagonal gives 4 × 3 = 12 and the other diagonal gives 2 × 5 = 10. So det A = 12 − 10 = 2.
The order of the subtraction matters. The main diagonal comes first: 10 − 12 = −2 is not the determinant of A.
The main diagonal of A runs from the 4 to the 3, and its product, 4 × 3 = 12, is the first term of the determinant.
What the determinant measures
The columns of A are (4, 5) and (2, 3). Drawn as arrows from the origin, they are two sides of a parallelogram, and the area of that parallelogram is |ad − bc|: for A it is 2.
The arrows are where A sends the two sides of the unit square, (1, 0) and (0, 1). So A turns a square of area 1 into a parallelogram of area 2, and every area in the plane is multiplied by 2. The determinant is the factor by which a matrix scales area.
The columns of A are the arrows to (4, 5) and to (2, 3), the shorter one. With the fourth corner at (6, 8) they make a long, thin parallelogram, and its area is det A = 2.
Moving the columns
The matrix (a b; 0 1) has determinant a × 1 − b × 0 = a, so b never changes it. Its first column, (a, 0), moves the bottom side of the unit square along the x-axis, and its second column, (b, 1), slides the top side sideways without changing its height.
det [[a, b], [0, 1]] = a × 1 − b × 0 = a, so b never appears: a shear leaves the area unchanged
Make the determinant 2
Drag the shear handle and the area stays at a. Drag the stretch handle to 2 and the area doubles, as the determinant does. At a = 0 the square is flattened onto a line, and past 0 it is turned over and the determinant is negative.
A determinant of zero
For B = (2 4; 1 2), the main diagonal gives 2 × 2 = 4 and the other diagonal gives 4 × 1 = 4. The two products match, so det B = 4 − 4 = 0.
The columns of B are (2, 1) and (4, 2), and (4, 2) is twice (2, 1): the two arrows lie along one line. The parallelogram they make is flat, with no area, and B squashes the whole plane onto that line. The rows show it too: the first row, 2 and 4, is twice the second row, 1 and 2.
The columns of B are the arrows to (2, 1), the shorter one, and to (4, 2). They lie along one line, so the parallelogram they make has no area and det B = 0.
Why zero means no inverse
B sends different points to the same place. B times the column (2; 0) is (2 × 2 + 4 × 0; 1 × 2 + 2 × 0) = (4; 2), and B times (0; 1) is (4; 2) as well. A matrix that undid B would have to send (4; 2) back to both points at once, which is impossible, so B has no inverse.
The algebra says the same. Multiply (a b; c d) by (d −b; −c a), the matrix with a and d swapped and the signs of b and c changed. The top left entry is ad − bc, the top right is −ab + ba = 0, the bottom left is cd − dc = 0, and the bottom right is −cb + da = ad − bc. So the product is (ad − bc)I. For A = (4 2; 5 3), (4 2; 5 3)(3 −2; −5 4) = (2 0; 0 2) = 2I, so dividing (3 −2; −5 4) by 2 gives a matrix that multiplies A to I: that is the inverse. For B the same product is (2 4; 1 2)(2 −4; −1 2) = O, and there is no dividing by 0.
So a 2 × 2 matrix has an inverse exactly when its determinant is not 0. Whether its entries are positive, large or small decides nothing.
Negative determinants
A determinant can be negative. For (1 2; 3 4), det = 1 × 4 − 2 × 3 = 4 − 6 = −2. The area is still multiplied by 2, but the plane is also turned over, as a reflection turns it, so the corners of the unit square run clockwise instead of counterclockwise. Any determinant that is not 0, negative or positive, means there is an inverse.
Finding an unknown entry
If (k 3; 4 6) has no inverse, its determinant is 0, so 6k − 3 × 4 = 0. Then 6k = 12 and k = 2. Check: (2 3; 4 6) has 2 × 6 = 12 and 3 × 4 = 12, which match.
An unknown can appear twice. (x 4; 1 x) has determinant , which is 0 when , so the matrix has no inverse when x = 2 or x = −2.
The usual mistakes
Adding the two products. 12 + 10 = 22 is not det A; the product along the other diagonal is subtracted, giving 2.
Multiplying down the columns. 4 × 5 − 2 × 3 = 14 pairs numbers in the same column; each product runs along a diagonal.
Leaving out a division when solving for k. In (k 3; 4 6), k × 6 = 3 × 4 = 12 gives , not 12.
Deciding from the entries. A matrix with every entry positive, such as (2 4; 1 2), can still have determinant 0 and no inverse.
A code and two receipts
In the first application below, a club codes pairs of letters with a matrix whose determinant is 0, and two different words come out as the same pair of numbers. In the second, two receipts give a pair of equations whose matrix has determinant 0, so the prices cannot be found, and changing one total leaves no prices at all.
Worked example: A Code Matrix with No Inverse, and Two Words Sent Through It
Question A club writes each letter as its place in the alphabet, A = 1, B = 2 and so on up to Z = 26, takes the numbers in pairs as columns, and multiplies each column by F = 2412 before sending it. (a) Find det F, and explain why F has no inverse. (b) Code the words GO and IN. Explain why a message coded with F cannot always be read.
1.The determinant is det F = ad − bc = 2 × 2 − 4 × 1 = 4 − 4 = 0.
The club's matrix is F = 2412, and det F = 2 × 2 − 4 × 1 = 0. 2.(a) The inverse would be 1det F2−4−12, and 10 does not exist, so F has no inverse. The rows show why: row 1, 24, is twice row 2, 12.
(a) The inverse would divide by det F = 0, so F has no inverse: row 1 of F is twice row 2. 3.GO is the pair 7, 15: F715 = 2 × 7 + 4 × 151 × 7 + 2 × 15 = 7437.
GO is 7, 15, and F715 = 7437. 4.IN is the pair 9, 14: F914 = 2 × 9 + 4 × 141 × 9 + 2 × 14 = 7437 as well.
IN is 9, 14, and F914 = 7437 as well. 5.(b) Both words are sent as 74, 37, so a friend who receives 74, 37 cannot tell GO from IN. For a pair x, y the code is 2(x + 2y) and x + 2y, which depends only on x + 2y, and 7 + 2 × 15 = 9 + 2 × 14 = 37. A code matrix needs a non-zero determinant, so that each coded pair comes from one message only.
(b) Both words are sent as 74, 37, so the receiver cannot tell GO from IN.
Answer: (a) det F = 0, so F has no inverse; (b) GO and IN are both sent as 74, 37, so the receiver cannot tell which word was meant
Common mistakes
- Writing F−1 = 2−4−12 and leaving out the division by the determinant. That matrix times F is the zero matrix, not I, so it decodes nothing.
- Deciding that the code works because the numbers sent look nothing like the letters. What matters is whether two messages share a code, and under F every pair with the same value of x + 2y does.
More determinants and inverses problems, worked step by step →
Worked example: Two School Shop Receipts in Proportion, from Which the Prices Cannot Be Found
Question A school shop sells notebooks at $x each and pens at $y each. One pupil pays $7 for 2 notebooks and 3 pens, and a second pupil pays $14 for 4 notebooks and 6 pens. (a) Write the receipts as a matrix equation, find its determinant, and explain why the two receipts do not fix the prices. Give two different pairs of prices, both positive, that fit both receipts. (b) Suppose the second receipt had said $15. Show that no prices fit both receipts, and say what that tells the shop.
1.The receipts give 2x + 3y = 7 and 4x + 6y = 14, so 2346xy = 714.
The receipts give 2x + 3y = 7 and 4x + 6y = 14: 2346xy = 714. 2.The determinant is 2 × 6 − 3 × 4 = 12 − 12 = 0, so the matrix has no inverse and the equations have no single solution.
The determinant is 2 × 6 − 3 × 4 = 0, so the matrix has no inverse. 3.The second pupil bought exactly twice what the first bought and paid exactly twice as much: 4x + 6y = 14 is 2x + 3y = 7 multiplied by 2. It is the same equation, and its graph is the same line.
The second order is exactly twice the first, and so is its total: the two equations draw the same line. 4.(a) One equation cannot fix two prices, and every point on the line 2x + 3y = 7 fits both receipts. Notebooks at $2 and pens at $1 fit, as 4 + 3 = 7, and so do notebooks at $0.50 and pens at $2, as 1 + 6 = 7.
(a) Every point on the line fits: notebooks at $2 with pens at $1, or notebooks at $0.50 with pens at $2. 5.With $15, doubling the first receipt still gives 4x + 6y = 14, but the second now says 4x + 6y = 15. The same 4 notebooks and 6 pens cannot cost both $14 and $15, so no prices fit: the two lines are parallel and never meet.
With $15 the second line is parallel to the first, and the two never meet. 6.(b) One of the receipts must be wrong. With fixed prices, twice the first order must cost twice as much, $14.
(b) No prices fit both receipts, so one of them is wrong: twice the first order must cost $14.
Answer: (a) 2346xy = 714 has determinant 0: the second receipt is twice the first, so the prices cannot be separated; notebooks at $2 with pens at $1, and notebooks at $0.50 with pens at $2, both fit; (b) the same 4 notebooks and 6 pens would cost both $14 and $15, so no prices fit and one receipt is wrong
Common mistakes
- Trying to find the inverse anyway and dividing by 0. When the determinant is 0 there is no inverse, and the equations must be compared directly to see whether they agree or clash.
- Concluding from a zero determinant that the receipts are wrong. A zero determinant means there is not exactly one solution: in (a) the receipts agree and fit many prices, and only in (b), where the totals clash, is there no solution.
More determinants and inverses problems, worked step by step →