Writing a system as AX = B and solving it by the inverse matrix, Cramer's rule and the Gauss-Jordan method, with word problems.
Lesson 9 of 9
7 min read
8 practice questions
Everything in this course comes together here. A system of linear equations can be written as one matrix equation AX=B, and then solved in three ways: by the inverse matrix, by Cramer's rule using determinants, or by row operations (the Gauss-Jordan method). The determinant of A also tells you in advance whether the system has exactly one solution. This lesson works through each method on the same systems so that you can compare them.
Writing a system as a matrix equation
Take the system
2x+3y=8,x−y=−1
Collect the coefficients, the unknowns and the constants into matrices:
A=[213−1],X=[xy],B=[8−1]
Multiplying out, AX=[2x+3yx−y], so the system is exactly the single equation AX=B. Here A is called the coefficient matrix.
Method 1: the inverse matrix
If ∣A∣=0, multiply both sides of AX=B on the left by A−1:
A−1AX=A−1B⟹IX=A−1B⟹X=A−1B
The system then has exactly one solution. (The multiplication must be on the left of both sides, because matrix multiplication is not commutative.)
So x=1, y=2, z=3. Check in the first equation: 1+4+3=8.
Method 2: Cramer's rule
Let Δ=∣A∣, and let Δ1, Δ2, Δ3 be the determinants obtained by replacing the first, second and third columns of A by the column of constants B. If Δ=0,
Write the augmented matrix[A∣B]: the coefficient matrix with the constants as an extra column. Then use row operations, which do not change the solutions:
interchange two rows;
multiply a row by a non-zero number;
add a multiple of one row to another.
Aim to turn the left part into I; the last column then shows the solution.
Example 5
Solve the system of Example 2 by the Gauss-Jordan method.
1212−1111−1830
R2→R2−2R1 and R3→R3−R1:
1002−5−11−1−28−13−8
Interchange R2 and R3, then multiply the new R2 by −1:
10021−512−188−13
R1→R1−2R2 and R3→R3+5R2:
100010−329−8827
R3→91R3, then R1→R1+3R3 and R2→R2−2R3:
100010001123
So x=1, y=2, z=3.
When is there exactly one solution?
If ∣A∣=0, the system has exactly one solution, and all three methods find it.
If ∣A∣=0, the inverse and Cramer's rule cannot be used. The system then has either no solution or infinitely many solutions. For example, x+2y=3 and 2x+4y=7 have ∣A∣=4−4=0; doubling the first gives 2x+4y=6, which contradicts the second, so there is no solution. But x+2y=3 and 2x+4y=6 are the same equation, with infinitely many solutions.
Example 6
Sita buys 2 pens and 3 notebooks for ₹110, and Ravi buys 3 pens and 1 notebook for ₹60. Find the price of a pen and of a notebook.
Let a pen cost ₹p and a notebook ₹n: 2p+3n=110 and 3p+n=60.
After R2→R2−2R1 and R3→R3−R1 the rows are (1,1,1∣9), (0,−3,−1∣−13), (0,1,−2∣−5). Continuing to reduce the left part to I gives the last column (2,3,4), so x=2, y=3, z=4.