A Secret Message Sent in Pairs of Numbers and Decoded with the Inverse Matrix
Two friends send messages in code. Each letter is replaced by its place in the alphabet, A = 1, B = 2 and so on up to Z = 26. The numbers are taken in pairs, each pair is written as a column, and the column is multiplied by E = 3152 before it is sent. (a) Find det E and the inverse E−1, and check that EE−1 = I. (b) A message arrives as the numbers 36, 65, 15, 29. Decode it.
Coding a pair multiplies it by E, and the inverse matrix E−1 undoes that multiplication, because E−1E = I. A 2 × 2 matrix has an inverse when its determinant ad − bc is not 0: swap the two entries on the leading diagonal, change the signs of the other two, and divide by the determinant.
- The determinant of E is ad − bc = 3 × 2 − 1 × 5 = 6 − 5 = 1. It is not 0, so E has an inverse and every coded pair can be decoded.
- Swap the 3 and the 2, change the signs of the 1 and the 5, and divide by the determinant: E−1 = 112−1−53 = 2−1−53.
- (a) Check: EE−1 = 3 × 2 + 1 × (−5)3 × (−1) + 1 × 35 × 2 + 2 × (−5)5 × (−1) + 2 × 3 = 1001 = I.
- Multiply the first coded pair by the inverse: E−13665 = 2 × 36 − 1 × 65−5 × 36 + 3 × 65 = 715, which is the letters G and O.
- Then the second pair: E−11529 = 2 × 15 − 1 × 29−5 × 15 + 3 × 29 = 112, which is A and L.
- (b) The message is GOAL. Check by coding the first pair again: E715 = 3 × 7 + 155 × 7 + 2 × 15 = 3665, the numbers that were sent.
answer(a) det E = 1 and E−1 = 2−1−53, and EE−1 = I; (b) the pairs decode to 7, 15, 1, 12, which is GOAL
techniqueThe Inverse of a 2 × 2 Matrix · The Determinant of a 2 × 2 Matrix
Common pitfalls
- Multiplying the coded pairs by E again. That codes the message a second time; only E−1 undoes E, because E−1E = I.
- Swapping the other two entries as well, or changing the signs on the leading diagonal. The inverse swaps a and d and changes the signs of b and c, and the check EE−1 = I catches the slip before any message is decoded.
A Code Matrix with No Inverse, and Two Words Sent Through It
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.
A code can be read only if the receiver can undo it, and undoing a matrix needs its inverse. The inverse of a 2 × 2 matrix divides by the determinant, so when the determinant is 0 there is no inverse. Then two different messages can be sent as the same numbers.
- The determinant is det F = ad − bc = 2 × 2 − 4 × 1 = 4 − 4 = 0.
- (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.
- GO is the pair 7, 15: F715 = 2 × 7 + 4 × 151 × 7 + 2 × 15 = 7437.
- IN is the pair 9, 14: F914 = 2 × 9 + 4 × 141 × 9 + 2 × 14 = 7437 as well.
- (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.
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
techniqueThe Determinant of a 2 × 2 Matrix · The Inverse of a 2 × 2 Matrix
Common pitfalls
- 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.
The Price of a Tin of Paint and of a Brush from Two Shopping Lists
At a hardware shop, 2 tins of paint and 3 brushes cost $40, and 1 tin of paint and 1 brush cost $17. A tin costs $x and a brush costs $y. (a) Write the two equations as a matrix equation Axy = 4017, and find det A and A−1. (b) Use A−1 to find the price of a tin and the price of a brush.
Two simultaneous equations are one matrix equation: the coefficients form the matrix A, the unknowns form a column, and the totals form another column. Multiplying both sides on the left by A−1 leaves the column of unknowns, because A−1A = I. On a graph each equation is a line, and the solution is where the two lines cross.
- The two lists give 2x + 3y = 40 and x + y = 17. The coefficients of x and y are the rows of A = 2311, so Axy = 4017.
- The determinant is det A = 2 × 1 − 3 × 1 = 2 − 3 = −1. It is not 0, so A has an inverse and the two lines cross at one point.
- (a) Swap the diagonal entries, change the signs of the other two and divide by −1: A−1 = 1−11−3−12 = −131−2.
- Multiply both sides on the left by A−1: xy = A−14017 = −1 × 40 + 3 × 171 × 40 − 2 × 17 = 116.
- (b) A tin of paint costs $11 and a brush costs $6, where the two lines cross at (11, 6). Check: 2 × 11 + 3 × 6 = 22 + 18 = 40 and 11 + 6 = 17.
answer(a) A = 2311, det A = −1 and A−1 = −131−2; (b) a tin of paint costs $11 and a brush costs $6
techniqueSolving Simultaneous Equations with a Matrix Inverse · The Inverse of a 2 × 2 Matrix · The Determinant of a 2 × 2 Matrix
Common pitfalls
- Multiplying on the right, 4017A−1. A 2 × 1 column cannot be multiplied by a 2 × 2 matrix on its right; A−1 must stand on the left, where A stood.
- Forgetting that the determinant is negative and using 1−3−12 as the inverse. The prices then come out as −11 and −6, and a negative price shows that a sign was lost.
Two Alloys Melted Together to Hold a Set Mass of Copper, and a Blend That Cannot Be Made
A foundry has two alloys: alloy A is 60% copper and alloy B is 30% copper. It melts x kg of A with y kg of B to make 10 kg of a new alloy. (a) The new alloy must contain 5.1 kg of copper. Write the two conditions as a matrix equation, multiplying the copper equation by 10 to clear the decimals, and solve it with the inverse matrix. (b) A customer asks for 10 kg of alloy that is 70% copper. Use the same inverse to show that this cannot be made.
The masses of the two alloys add to the mass of the blend, and the copper in each adds to the copper in the blend. That gives two equations in x and y, which the inverse matrix solves. The inverse always returns two numbers, so each answer must be checked against the situation: a mass cannot be negative.
- The masses add to 10 kg: x + y = 10. The copper is 0.6x + 0.3y = 5.1, and multiplying by 10 gives 6x + 3y = 51. So 1163xy = 1051.
- The determinant is 1 × 3 − 1 × 6 = −3, so the inverse is 1−33−1−61.
- Multiply the column of totals by the inverse: xy = 1−33 × 10 − 1 × 51−6 × 10 + 1 × 51 = 1−3−21−9 = 73.
- (a) The foundry melts 7 kg of alloy A with 3 kg of alloy B. Check: 0.6 × 7 + 0.3 × 3 = 4.2 + 0.9 = 5.1 kg of copper in 7 + 3 = 10 kg.
- For 70% the copper is 0.7 × 10 = 7 kg, so 6x + 3y = 70 and the column of totals is 1070. Then 1−330 − 70−60 + 70 = 1−3−4010 = 1313−313.
- (b) A mass of −313 kg of alloy B cannot be melted, so the order cannot be made. Any blend of a 60% alloy and a 30% alloy is between 30% and 60% copper, and 70% is above both.
answer(a) 1163xy = 1051, so the foundry melts 7 kg of alloy A with 3 kg of alloy B; (b) the inverse gives −313 kg of alloy B, a negative mass, so 70% copper cannot be made
techniqueSolving Simultaneous Equations with a Matrix Inverse · The Inverse of a 2 × 2 Matrix
Common pitfalls
- Writing the copper as 60x + 30y = 5.1. The percentages must be written as the decimals 0.6 and 0.3 before the equation is multiplied by 10; otherwise the copper is out by a factor of 100.
- Giving 1313 kg and −313 kg as the answer to (b). The inverse always returns two numbers, but a negative mass describes no real blend, so the answer has to be checked against the situation.
Two School Shop Receipts in Proportion, from Which the Prices Cannot Be Found
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.
When the determinant is 0 the matrix has no inverse, and the two equations do not have exactly one solution. Then the equations are compared directly. If one is a multiple of the other, totals included, they are the same line and every point on it fits. If the left sides are in proportion but the totals are not, the lines are parallel and nothing fits.
- The receipts give 2x + 3y = 7 and 4x + 6y = 14, so 2346xy = 714.
- The determinant is 2 × 6 − 3 × 4 = 12 − 12 = 0, so the matrix has no inverse and the equations have no single solution.
- 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.
- (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.
- 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.
- (b) One of the receipts must be wrong. With fixed prices, twice the first order must cost twice as much, $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
techniqueThe Determinant of a 2 × 2 Matrix · Solving Simultaneous Equations with a Matrix Inverse
Common pitfalls
- 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.
The Area of a Triangular Field from the Coordinates of Its Corners, and a Fence Post Tested Against Two of Them
On a map with a grid of 10 m squares, the corners of a triangular field are A(2, 2), B(8, 4) and C(4, 9). The area of a triangle with corners (x1, y1), (x2, y2) and (x3, y3) is half of the determinant x1y11x2y21x3y31, taken without its sign. (a) Find the determinant for A, B and C by expanding along the first row, and hence the area of the field in square meters. (b) A fence post stands at D(14, 6). Find the determinant for A, B and D, and say what it shows about the three posts.
To expand a 3 × 3 determinant along its first row, multiply each entry by the 2 × 2 determinant left when its row and column are deleted, and combine the three products with the signs +, −, +. For three corners the result is twice the area of the triangle, so a result of 0 means there is no triangle: the three points lie on one straight line.
- Put the corners in the rows: 221841491. Each entry of the first row multiplies the 2 × 2 determinant left when its row and column are deleted, and the signs go +, −, +.
- The three 2 × 2 determinants are 4191 = 4 − 9 = −5, 8141 = 8 − 4 = 4 and 8449 = 72 − 16 = 56.
- So the determinant is 2 × (−5) − 2 × 4 + 1 × 56 = −10 − 8 + 56 = 38.
- (a) The area is 12 × 38 = 19 grid squares. Each square is 10 × 10 = 100 square meters, so the field is 19 × 100 = 1900 square meters.
- For A, B and D: 2218411461 = 2 × (4 − 6) − 2 × (8 − 14) + 1 × (48 − 56) = −4 + 12 − 8 = 0.
- (b) A triangle ABD would have no area, so A, B and D lie on one straight line: a fence from A through B runs straight on to D. Check: from A to B is 6 across and 2 up, and from A to D is 12 across and 4 up, which is the same direction.
answer(a) The determinant is 38, so the field has an area of 19 grid squares, which is 1900 square meters; (b) the determinant is 0, so A, B and D lie on one straight line
techniqueThe Determinant of a 3 × 3 Matrix
Common pitfalls
- Using a plus sign for every term of the expansion. The middle term takes a minus sign, from the pattern +, −, + along the first row; with all plus signs the determinant comes out as −10 + 8 + 56 = 54 and the area as 27 squares, which is wrong.
- Giving the area as 19 square meters. The coordinates count grid squares 10 m wide, so each square unit of area on the map is 100 square meters on the ground.
The Prices of Roses, Lilies and Tulips from Three Bouquets, Found with a 3 × 3 Inverse
A florist sells three bouquets. Bouquet P has 1 rose, 2 lilies and 1 tulip and costs $13; bouquet Q has 1 rose, 1 lily and 1 tulip and costs $9; bouquet R has 2 roses, 1 lily and 1 tulip and costs $12. A rose costs $x, a lily $y and a tulip $z. (a) Write this as Axyz = 13912, find det A by expanding along the first row, and find A−1. (b) Use A−1 to find the price of each flower.
Every entry of a 3 × 3 matrix has a minor, the 2 × 2 determinant left when its row and column are deleted. Giving each minor the sign from the pattern of alternating + and − makes it a cofactor. The inverse is the transpose of the matrix of cofactors, divided by the determinant.
- The three bouquets give x + 2y + z = 13, x + y + z = 9 and 2x + y + z = 12, so A = 121111211.
- Expand along the first row with the signs +, −, +: det A = 1 × (1 − 1) − 2 × (1 − 2) + 1 × (1 − 2) = 0 + 2 − 1 = 1. It is not 0, so A has an inverse.
- Find the minor of every entry, and give it the sign from the pattern +−+−+−+−+. For example, the minor of the 2 in row 1 is 1 × 1 − 1 × 2 = −1, and its place takes −, so its cofactor is 1. The cofactors are 01−1−1−1310−1.
- (a) Transpose the cofactors, turning each row into a column, and divide by det A = 1: A−1 = 0−111−10−13−1.
- Multiply the column of prices by the inverse: xyz = A−113912 = 0 − 9 + 1213 − 9 + 0−13 + 27 − 12 = 342.
- (b) A rose costs $3, a lily $4 and a tulip $2. Check: bouquet P costs 3 + 8 + 2 = 13 dollars, Q costs 3 + 4 + 2 = 9 and R costs 6 + 4 + 2 = 12.
answer(a) det A = 1 and A−1 = 0−111−10−13−1; (b) a rose costs $3, a lily $4 and a tulip $2
techniqueThe Inverse of a 3 × 3 Matrix · The Determinant of a 3 × 3 Matrix · Solving Three Equations with a Matrix Inverse
Common pitfalls
- Forgetting to transpose the cofactors. The matrix of cofactors is not the inverse: its first row times the column of prices gives 0 × 13 + 1 × 9 − 1 × 12 = −3, a negative price.
- Using the minors without the signs of the pattern. The minors in the places marked − change sign; without that, A times the result is not I.
Three Animal Feeds Mixed to Supply Exact Amounts of Protein, Fiber and Fat
A farmer mixes three feeds. Each kilogram of feed A supplies 2 units of protein, 1 of fiber and 1 of fat; each kilogram of feed B supplies 1, 2 and 1; and each kilogram of feed C supplies 1, 1 and 2. A herd needs 14 units of protein, 12 of fiber and 10 of fat a day. (a) Using a, b and c kg of feeds A, B and C, write the needs as a matrix equation, find the inverse of its matrix, and find how much of each feed the herd needs a day. (b) A second herd needs 12 units of protein, 11 of fiber and 9 of fat. Use the same inverse to find how much of each feed it needs.
Each nutrient gives one equation: the amounts of the three feeds, each times what a kilogram of it supplies, add to the need. The matrix has one row for each nutrient and one column for each feed. Its inverse is found once, and then any set of needs is met by one multiplication.
- Protein gives 2a + b + c = 14, fiber gives a + 2b + c = 12 and fat gives a + b + 2c = 10, so Mabc = 141210 with M = 211121112.
- Expand along the first row: det M = 2 × (4 − 1) − 1 × (2 − 1) + 1 × (1 − 2) = 6 − 1 − 1 = 4.
- Each entry on the leading diagonal has the minor 2 × 2 − 1 × 1 = 3. Every entry off the diagonal has a minor of 1 or −1, and with the sign from the pattern each of those cofactors is −1. So the cofactors are 3−1−1−13−1−1−13, which is its own transpose.
- Divide the transposed cofactors by det M = 4: M−1 = 143−1−1−13−1−1−13.
- (a) M−1141210 = 1442 − 12 − 10−14 + 36 − 10−14 − 12 + 30 = 1420124 = 531: the herd needs 5 kg of A, 3 kg of B and 1 kg of C. Check: adding the three equations gives 4(a + b + c) = 36, so a + b + c = 9, and then protein gives a = 14 − 9 = 5.
- (b) The same inverse serves the second herd: 1436 − 11 − 9−12 + 33 − 9−12 − 11 + 27 = 1416124 = 431, so it needs 4 kg of A, 3 kg of B and 1 kg of C. Check: 2 × 4 + 3 + 1 = 12, 4 + 6 + 1 = 11 and 4 + 3 + 2 = 9.
answer(a) M = 211121112 and M−1 = 143−1−1−13−1−1−13; the herd needs 5 kg of A, 3 kg of B and 1 kg of C; (b) 4 kg of A, 3 kg of B and 1 kg of C
techniqueSolving Three Equations with a Matrix Inverse · The Inverse of a 3 × 3 Matrix
Common pitfalls
- Leaving out the 14. The transposed cofactors are 4M−1, not M−1, and they give 20 kg of feed A, which alone supplies 40 units of protein, far more than 14.
- Putting each feed in a row instead of a column. Here M happens to equal its own transpose, so the slip does no harm, but each equation is one nutrient, so in general the rows must be the nutrients and each feed's amounts must run down a column.
Three Sheets of Laser Light at a Concert That Cross at a Single Point
At a concert, three flat sheets of laser light fill the planes x + z = 5, −y + 2z = 5 and 2x − y = 3, with coordinates in meters and z measured up from the stage. A mirror ball is to hang where all three sheets cross. (a) Find the determinant of the matrix of coefficients, and explain what it tells you about how the three planes meet. (b) Find the point where the mirror ball hangs.
Each linear equation in x, y and z is a plane. When the determinant of the coefficients is not 0 the matrix has an inverse, so the three equations have exactly one solution: the three planes meet at a single point. The point can then be found with the inverse or, when the equations are simple, by elimination.
- The coefficients of x, y and z make the matrix 1010−122−10, with one row for each sheet.
- Expand along the first row. Its middle entry is 0, so only two 2 × 2 determinants are needed: 1 × ((−1) × 0 − 2 × (−1)) − 0 + 1 × (0 × (−1) − (−1) × 2) = 2 + 2 = 4.
- (a) The determinant is 4, not 0, so the matrix has an inverse and the three equations have exactly one solution: the three planes meet at a single point.
- Elimination is quicker here than the inverse. The first sheet gives x = 5 − z, and then the third gives y = 2x − 3 = 2(5 − z) − 3 = 7 − 2z.
- Substitute both into the second: −(7 − 2z) + 2z = 5, so 4z − 7 = 5, 4z = 12 and z = 3. Then x = 5 − 3 = 2 and y = 7 − 2 × 3 = 1.
- (b) The mirror ball hangs at (2, 1, 3), which is 3 m above the stage. Check in all three sheets: 2 + 3 = 5, −1 + 2 × 3 = 5 and 2 × 2 − 1 = 3.
answer(a) The determinant is 4, which is not 0, so the three planes meet at exactly one point; (b) the mirror ball hangs at (2, 1, 3), 3 m above the stage
techniqueThe Geometry of Three Planes · The Determinant of a 3 × 3 Matrix
Common pitfalls
- Stopping at a point that satisfies two of the equations. Two planes meet along a whole line; only a point that satisfies all three equations is on all three sheets, so the check must use each one.
- Reading the determinant 4 as a coordinate or a distance. The determinant decides only how the planes meet: not 0 means one point, and 0 means a line of common points or none at all.
Three Weighings of Mixed Boxes: What They Fix, and a Weighing Recorded Differently
A warehouse stocks boxes of three kinds, weighing x, y and z kg each. Three loads are weighed: 1 box of the first kind, 1 of the second and 3 of the third weigh 13 kg; 3 boxes of the first kind weigh 6 kg; and 4 of the first kind, 1 of the second and 3 of the third weigh 19 kg. (a) Show that the matrix of the three equations has determinant 0. Find what the weighings do tell you, given that every box weighs more than nothing, and describe how the three planes meet. (b) Suppose the third load had been recorded as 13 kg. Show that the equations then have no solution, and describe how the three planes lie.
A zero determinant means that the three equations do not have exactly one solution, and that one row of the matrix is made from the others. If the totals are made from the others in the same way, that equation repeats what the others say, and the planes meet along a line. If the totals disagree, no point lies on all three planes.
- The loads give x + y + 3z = 13, 3x = 6 and 4x + y + 3z = 19, with the matrix 113300413.
- Expand along the second row, which has two zeros. Its first entry takes the sign −, so the determinant is −3 × 1313 + 0 − 0 = −3 × (3 − 3) = 0. The matrix has no inverse, and there is no single solution.
- Row 3 is row 1 plus row 2, because the third load is the first two loads together. Its weight agrees, as 13 + 6 = 19, so the third equation adds nothing new.
- The second load gives x = 2, and then the first gives 2 + y + 3z = 13, so y + 3z = 11. The second and third kinds always go on the scale as 1 box and 3 boxes together, so only y + 3z can be found.
- (a) Each box of the first kind weighs 2 kg, but y and z cannot be separated: y = 5 with z = 2 fits, and so does y = 2 with z = 3. The three planes meet along the line x = 2, y + 3z = 11.
- (b) With 13 kg, the third load, which is the first two together, would weigh both 13 + 6 = 19 kg and 13 kg, so no weights fit all three equations. No two of the planes are parallel, so each pair meets along a line, but the three lines are parallel: the planes form a triangular prism, with no point on all three. One of the weighings must be wrong.
answer(a) The determinant is 0, because the third load is the first two together; each box of the first kind weighs 2 kg, but only y + 3z = 11 is known, and the three planes meet along the line x = 2, y + 3z = 11; (b) the third load would weigh both 19 kg and 13 kg, so there is no solution: the planes form a triangular prism with no common point
techniqueThe Geometry of Three Planes · The Determinant of a 3 × 3 Matrix
Common pitfalls
- Deciding from the zero determinant alone that there is no solution. A zero determinant means there is not exactly one solution; whether there is a line of solutions or none depends on whether the totals agree, as 13 + 6 = 19 does here.
- Expecting three planes with no common point to include two parallel planes. No row of this matrix is a multiple of another, so no two planes are parallel; they cross in pairs along three parallel lines, like the three faces of a triangular prism.