Class 12 Maths, Worked in Full Past papersGet updates
Chapter 4 · Determinants

Exercise 4.5 · Q14: Solve x−y+2z=7x-y+2z=7⁠, 3x+4y−5z=−53x+4y-5z=-5⁠, 2x−y+3z=122x-y+3z=12 by the matrix method

Exercise 4.5Solving systems AX = B · Section 4.6.1
The question

Solve system of linear equations, using matrix method, in Exercises 7 to 14.

14.

x−y+2z=73x+4y−5z=−52x−y+3z=12\begin{aligned} x - y + 2z &= 7\\ 3x + 4y - 5z &= -5\\ 2x - y + 3z &= 12 \end{aligned}
Exam answer

The system is AX=BAX = B⁠, where

A=[1−1234−52−13],X=[xyz], B=[7−512]\begin{aligned} A &= \begin{bmatrix} 1 & -1 & 2 \\ 3 & 4 & -5 \\ 2 & -1 & 3 \end{bmatrix}, \\ X &= \begin{bmatrix} x \\ y \\ z \end{bmatrix},\ B = \begin{bmatrix} 7 \\ -5 \\ 12 \end{bmatrix} \end{aligned}

Expanding along R1R_1⁠:

∣A∣=1∣4−5−13∣−(−1)∣3−523∣+2∣342−1∣=1(7)+1(19)+2(−11)=4\begin{aligned} |A| &= 1\begin{vmatrix} 4 & -5 \\ -1 & 3 \end{vmatrix} - (-1)\begin{vmatrix} 3 & -5 \\ 2 & 3 \end{vmatrix} \\ &\quad + 2\begin{vmatrix} 3 & 4 \\ 2 & -1 \end{vmatrix} \\ &= 1(7) + 1(19) + 2(-11) \\ &= 4 \end{aligned}

∣A∣=4≠0|A| = 4 \ne 0⁠. So A−1A^{-1} exists and the system has a unique solution, X=A−1BX = A^{-1}B⁠.

Cofactors:

A11=∣4−5−13∣=7A12=−∣3−523∣=−19A13=∣342−1∣=−11\begin{aligned} A_{11} &= \begin{vmatrix} 4 & -5 \\ -1 & 3 \end{vmatrix} = 7 \\ A_{12} &= -\begin{vmatrix} 3 & -5 \\ 2 & 3 \end{vmatrix} = -19 \\ A_{13} &= \begin{vmatrix} 3 & 4 \\ 2 & -1 \end{vmatrix} = -11 \end{aligned} A21=−∣−12−13∣=1A22=∣1223∣=−1A23=−∣1−12−1∣=−1\begin{aligned} A_{21} &= -\begin{vmatrix} -1 & 2 \\ -1 & 3 \end{vmatrix} = 1 \\ A_{22} &= \begin{vmatrix} 1 & 2 \\ 2 & 3 \end{vmatrix} = -1 \\ A_{23} &= -\begin{vmatrix} 1 & -1 \\ 2 & -1 \end{vmatrix} = -1 \end{aligned} A31=∣−124−5∣=−3A32=−∣123−5∣=11A33=∣1−134∣=7\begin{aligned} A_{31} &= \begin{vmatrix} -1 & 2 \\ 4 & -5 \end{vmatrix} = -3 \\ A_{32} &= -\begin{vmatrix} 1 & 2 \\ 3 & -5 \end{vmatrix} = 11 \\ A_{33} &= \begin{vmatrix} 1 & -1 \\ 3 & 4 \end{vmatrix} = 7 \end{aligned} adj⁡A=[71−3−19−111−11−17]A−1=1∣A∣adj⁡A=14[71−3−19−111−11−17]\begin{aligned} \operatorname{adj}A &= \begin{bmatrix} 7 & 1 & -3 \\ -19 & -1 & 11 \\ -11 & -1 & 7 \end{bmatrix} \\ A^{-1} &= \frac{1}{|A|}\operatorname{adj}A \\ &= \frac{1}{4}\begin{bmatrix} 7 & 1 & -3 \\ -19 & -1 & 11 \\ -11 & -1 & 7 \end{bmatrix} \end{aligned} X=A−1B=14[71−3−19−111−11−17][7−512]=14[49−5−36−133+5+132−77+5+84]=14[8412]=[213]\begin{aligned} X &= A^{-1}B \\ &= \frac{1}{4}\begin{bmatrix} 7 & 1 & -3 \\ -19 & -1 & 11 \\ -11 & -1 & 7 \end{bmatrix}\begin{bmatrix} 7 \\ -5 \\ 12 \end{bmatrix} \\ &= \frac{1}{4}\begin{bmatrix} 49 - 5 - 36 \\ -133 + 5 + 132 \\ -77 + 5 + 84 \end{bmatrix} \\ &= \frac{1}{4}\begin{bmatrix} 8 \\ 4 \\ 12 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \\ 3 \end{bmatrix} \end{aligned}

∴ x=2, y=1, z=3\therefore\ x = 2,\ y = 1,\ z = 3⁠.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

The system is AX=BAX = B⁠. A nonzero ∣A∣|A| means AA can be undone by A−1=1∣A∣adj⁡AA^{-1} = \frac{1}{|A|}\operatorname{adj} A⁠, so X=A−1BX = A^{-1}B is the only solution. It does not matter that ∣A∣|A| turns out small (here 4) compared with the cofactors: any nonzero value works.

Given, to find, and the plan
Given
x−y+2z=7x - y + 2z = 7⁠, 3x+4y−5z=−53x + 4y - 5z = -5⁠, 2x−y+3z=122x - y + 3z = 12⁠.
To find
xx⁠, yy⁠, zz by the matrix method.
Plan
(1) AX=BAX = B⁠. (2) ∣A∣|A| along row 1. (3) All nine minors and cofactors. (4) adj⁡A\operatorname{adj} A⁠, A−1A^{-1}⁠. (5) Check A(adj⁡A)=∣A∣ IA(\operatorname{adj} A) = |A|\,I⁠. (6) X=A−1BX = A^{-1}B⁠. (7) Check in the equations.

Basics you need

1A system is a matrix product

Row ii of AA times XX is the left side of equation ii⁠. Basics: matrix facts the chapter uses

2Expansion along row 1

∣A∣=a11M11−a12M12+a13M13|A| = a_{11}M_{11} - a_{12}M_{12} + a_{13}M_{13}⁠, from the signs + − ++\,-\,+⁠. Basics: the + − + sign pattern

3Minor, cofactor, adjoint

MijM_{ij}⁠: delete row ii and column jj⁠. Aij=(−1)i+jMijA_{ij} = (-1)^{i+j}M_{ij}⁠. adj⁡A\operatorname{adj} A is the transpose of [Aij][A_{ij}]⁠. Basics: where the determinant comes from

4The inverse divides by ∣A∣|A|

A(adj⁡A)=∣A∣ IA(\operatorname{adj} A) = |A|\,I⁠, so A−1=1∣A∣adj⁡AA^{-1} = \frac{1}{|A|}\operatorname{adj} A when ∣A∣≠0|A| \ne 0⁠. Basics: why the inverse divides by |A|

Solution

  1. Write the system as AX=BAX = B

    A=[1−1234−52−13],A = \begin{bmatrix} 1 & -1 & 2 \\ 3 & 4 & -5 \\ 2 & -1 & 3 \end{bmatrix}, X=[xyz],B=[7−512].X = \begin{bmatrix} x \\ y \\ z \end{bmatrix},\quad B = \begin{bmatrix} 7 \\ -5 \\ 12 \end{bmatrix}.

    AA is 3×33\times3 and XX is 3×13\times1⁠, so AXAX is defined and 3×13\times1⁠, like BB⁠:

    AX=[x−y+2z3x+4y−5z2x−y+3z].AX = \begin{bmatrix} x - y + 2z \\ 3x + 4y - 5z \\ 2x - y + 3z \end{bmatrix}.
    Equality of the 3×13\times1 matrices AXAX and BB means equality of their three entries, which are the three equations. So solving AX=BAX = B is the same as solving the system.
    Section 4.6.1 (matrix form); Section 3.4.5 (row times column). Lesson: solving systems AX = B
  2. Compute ∣A∣|A| by expanding along row 1

    ∣A∣=1∣4−5−13∣−(−1)∣3−523∣+2∣342−1∣=1(7)−(−1)(19)+2(−11)=7+19−22=4.\begin{aligned} |A| &= 1\begin{vmatrix} 4 & -5 \\ -1 & 3 \end{vmatrix} - (-1)\begin{vmatrix} 3 & -5 \\ 2 & 3 \end{vmatrix}\\ &\qquad + 2\begin{vmatrix} 3 & 4 \\ 2 & -1 \end{vmatrix}\\ &= 1(7) - (-1)(19) + 2(-11)\\ &= 7 + 19 - 22 = 4. \end{aligned}

    (The three minors 77⁠, 1919⁠, −11-11 are worked out in Step 3.) ∣A∣=4≠0|A| = 4 \ne 0⁠, so AA is nonsingular and the solution is unique.

    Row 1 has the entry 11 and the entry −1-1⁠, which make two of the three products easy. In the middle term, the sign −- of position (1, 2) and the entry −1-1 multiply to +1+1⁠.
    Section 4.2.3 (expansion along R1); Section 4.6.1, Case I. Lesson: expanding a 3 × 3 determinant
  3. Find all nine minors and cofactors

    Row 1 (entries 1,−1,21, -1, 2⁠):

    M11=∣4−5−13∣=(4)(3)−(−5)(−1)=7,A11=(−1)1+1(7)=7,M12=∣3−523∣=(3)(3)−(−5)(2)=19,A12=(−1)1+2(19)=−19,M13=∣342−1∣=(3)(−1)−(4)(2)=−11,A13=(−1)1+3(−11)=−11.\begin{aligned} M_{11} &= \begin{vmatrix} 4 & -5 \\ -1 & 3 \end{vmatrix}\\ &= (4)(3) - (-5)(-1) = 7,\\ A_{11} &= (-1)^{1+1}(7) = 7,\\ M_{12} &= \begin{vmatrix} 3 & -5 \\ 2 & 3 \end{vmatrix}\\ &= (3)(3) - (-5)(2) = 19,\\ A_{12} &= (-1)^{1+2}(19) = -19,\\ M_{13} &= \begin{vmatrix} 3 & 4 \\ 2 & -1 \end{vmatrix}\\ &= (3)(-1) - (4)(2) = -11,\\ A_{13} &= (-1)^{1+3}(-11) = -11. \end{aligned}

    Row 2 (entries 3,4,−53, 4, -5⁠):

    M21=∣−12−13∣=(−1)(3)−(2)(−1)=−1,A21=(−1)2+1(−1)=1,M22=∣1223∣=(1)(3)−(2)(2)=−1,A22=(−1)2+2(−1)=−1,M23=∣1−12−1∣=(1)(−1)−(−1)(2)=1,A23=(−1)2+3(1)=−1.\begin{aligned} M_{21} &= \begin{vmatrix} -1 & 2 \\ -1 & 3 \end{vmatrix}\\ &= (-1)(3) - (2)(-1) = -1,\\ A_{21} &= (-1)^{2+1}(-1) = 1,\\ M_{22} &= \begin{vmatrix} 1 & 2 \\ 2 & 3 \end{vmatrix}\\ &= (1)(3) - (2)(2) = -1,\\ A_{22} &= (-1)^{2+2}(-1) = -1,\\ M_{23} &= \begin{vmatrix} 1 & -1 \\ 2 & -1 \end{vmatrix}\\ &= (1)(-1) - (-1)(2) = 1,\\ A_{23} &= (-1)^{2+3}(1) = -1. \end{aligned}

    Row 3 (entries 2,−1,32, -1, 3⁠):

    M31=∣−124−5∣=(−1)(−5)−(2)(4)=−3,A31=(−1)3+1(−3)=−3,M32=∣123−5∣=(1)(−5)−(2)(3)=−11,A32=(−1)3+2(−11)=11,M33=∣1−134∣=(1)(4)−(−1)(3)=7,A33=(−1)3+3(7)=7.\begin{aligned} M_{31} &= \begin{vmatrix} -1 & 2 \\ 4 & -5 \end{vmatrix}\\ &= (-1)(-5) - (2)(4) = -3,\\ A_{31} &= (-1)^{3+1}(-3) = -3,\\ M_{32} &= \begin{vmatrix} 1 & 2 \\ 3 & -5 \end{vmatrix}\\ &= (1)(-5) - (2)(3) = -11,\\ A_{32} &= (-1)^{3+2}(-11) = 11,\\ M_{33} &= \begin{vmatrix} 1 & -1 \\ 3 & 4 \end{vmatrix}\\ &= (1)(4) - (-1)(3) = 7,\\ A_{33} &= (-1)^{3+3}(7) = 7. \end{aligned}
    In M11M_{11} the second product is (−5)(−1)=+5(-5)(-1) = +5⁠, so M11=12−5=7M_{11} = 12 - 5 = 7⁠. Products of two negatives are the most common source of slips in this question, which is why each minor is written as ad−bcad - bc with brackets.
    Definitions 1 and 2, Section 4.4. Lesson: minors and cofactors
  4. Build adj⁡A\operatorname{adj} A and A−1A^{-1}

    Matrix of cofactors:

    [7−19−111−1−1−3117]\begin{bmatrix} 7 & -19 & -11 \\ 1 & -1 & -1 \\ -3 & 11 & 7 \end{bmatrix}

    Its transpose, and the inverse:

    adj⁡A=[71−3−19−111−11−17],\operatorname{adj} A = \begin{bmatrix} 7 & 1 & -3 \\ -19 & -1 & 11 \\ -11 & -1 & 7 \end{bmatrix}, A−1=14[71−3−19−111−11−17].A^{-1} = \frac{1}{4}\begin{bmatrix} 7 & 1 & -3 \\ -19 & -1 & 11 \\ -11 & -1 & 7 \end{bmatrix}.
    Transposing turns the row of cofactors 7,−19,−117, -19, -11 into the first column. Dividing by ∣A∣=4|A| = 4 is postponed: it is easier to multiply whole numbers first and divide once at the end.
    Definition 3, Section 4.5.1; Theorem 4, Section 4.5. Lesson: the adjoint
  5. Check: A(adj⁡A)=4 IA(\operatorname{adj} A) = 4\,I

    (1,1): 1(7)+(−1)(−19)+2(−11)=7+19−22=4,(1,2): 1(1)+(−1)(−1)+2(−1)=1+1−2=0,(1,3): 1(−3)+(−1)(11)+2(7)=−3−11+14=0,(2,1): 3(7)+4(−19)+(−5)(−11)=21−76+55=0,(2,2): 3(1)+4(−1)+(−5)(−1)=3−4+5=4,(2,3): 3(−3)+4(11)+(−5)(7)=−9+44−35=0,(3,1): 2(7)+(−1)(−19)+3(−11)=14+19−33=0,(3,2): 2(1)+(−1)(−1)+3(−1)=2+1−3=0,(3,3): 2(−3)+(−1)(11)+3(7)=−6−11+21=4.\begin{aligned} (1,1)&:\ 1(7) + (-1)(-19) + 2(-11)\\ &= 7 + 19 - 22 = 4,\\ (1,2)&:\ 1(1) + (-1)(-1) + 2(-1)\\ &= 1 + 1 - 2 = 0,\\ (1,3)&:\ 1(-3) + (-1)(11) + 2(7)\\ &= -3 - 11 + 14 = 0,\\ (2,1)&:\ 3(7) + 4(-19) + (-5)(-11)\\ &= 21 - 76 + 55 = 0,\\ (2,2)&:\ 3(1) + 4(-1) + (-5)(-1)\\ &= 3 - 4 + 5 = 4,\\ (2,3)&:\ 3(-3) + 4(11) + (-5)(7)\\ &= -9 + 44 - 35 = 0,\\ (3,1)&:\ 2(7) + (-1)(-19) + 3(-11)\\ &= 14 + 19 - 33 = 0,\\ (3,2)&:\ 2(1) + (-1)(-1) + 3(-1)\\ &= 2 + 1 - 3 = 0,\\ (3,3)&:\ 2(-3) + (-1)(11) + 3(7)\\ &= -6 - 11 + 21 = 4. \end{aligned}

    So

    A(adj⁡A)=[400040004]=4 I,A(\operatorname{adj} A) = \begin{bmatrix} 4 & 0 & 0 \\ 0 & 4 & 0 \\ 0 & 0 & 4 \end{bmatrix} = 4\,I,

    and AA−1=14(4 I)=IAA^{-1} = \frac{1}{4}(4\,I) = I⁠.

    This is Theorem 1 in action. The large numbers in (2,1)(2,1) cancel exactly to 0. If just one of A11A_{11}⁠, A12A_{12}⁠, A13A_{13} were wrong, this entry could not be 0, because each entry 3,4,−53, 4, -5 of row 2 is nonzero and would multiply the error. The full product 4 I4\,I checks all nine cofactors together.
    Theorem 1, Section 4.5; Note in Section 4.4. Basics: why the inverse divides by |A|
  6. Compute X=A−1BX = A^{-1}B

    A−1A^{-1} is 3×33\times3 and BB is 3×13\times1⁠, so A−1BA^{-1}B is 3×13\times1⁠. First (adj⁡A)B(\operatorname{adj} A)B⁠:

    row 1: 7(7)+1(−5)+(−3)(12)=49−5−36=8,row 2: (−19)(7)+(−1)(−5)+11(12)=−133+5+132=4,row 3: (−11)(7)+(−1)(−5)+7(12)=−77+5+84=12.\begin{aligned} \text{row 1}&:\ 7(7) + 1(-5) + (-3)(12)\\ &= 49 - 5 - 36 = 8,\\ \text{row 2}&:\ (-19)(7) + (-1)(-5) + 11(12)\\ &= -133 + 5 + 132 = 4,\\ \text{row 3}&:\ (-11)(7) + (-1)(-5) + 7(12)\\ &= -77 + 5 + 84 = 12. \end{aligned} X=[xyz]=14[8412]=[213].X = \begin{bmatrix} x \\ y \\ z \end{bmatrix} = \frac{1}{4}\begin{bmatrix} 8 \\ 4 \\ 12 \end{bmatrix} = \begin{bmatrix} 2 \\ 1 \\ 3 \end{bmatrix}.

    So x=2x = 2⁠, y=1y = 1⁠, z=3z = 3.

    X=A−1BX = A^{-1}B is forced: from AX=BAX = B⁠, multiplying on the left by A−1A^{-1} gives IX=A−1BIX = A^{-1}B⁠. Every entry of (adj⁡A)B(\operatorname{adj} A)B is divisible by 4, a good sign that the arithmetic is right (the solution of a system with whole-number data need not be whole, but a stray non-multiple here would invite a second look).
    Section 4.6.1, Case I. Lesson: inverse of a matrix
  7. Check in all three original equations

    x−y+2z=2−1+2(3)=7,3x+4y−5z=3(2)+4(1)−5(3)=6+4−15=−5,2x−y+3z=2(2)−1+3(3)=12.\begin{aligned} x - y + 2z &= 2 - 1 + 2(3) = 7,\\ 3x + 4y - 5z &= 3(2) + 4(1) - 5(3)\\ &= 6 + 4 - 15 = -5,\\ 2x - y + 3z &= 2(2) - 1 + 3(3) = 12. \end{aligned}

    All three hold.

    Each equation is satisfied, so (2,1,3)(2, 1, 3) is a solution; Step 6 showed it is the only one.
Result

∣A∣=4≠0|A| = 4 \ne 0⁠, and

A−1=14[71−3−19−111−11−17].A^{-1} = \frac{1}{4}\begin{bmatrix} 7 & 1 & -3 \\ -19 & -1 & 11 \\ -11 & -1 & 7 \end{bmatrix}.

The unique solution is x=2x = 2⁠, y=1y = 1⁠, z=3z = 3.

(Textbook answer: x=2x = 2⁠, y=1y = 1⁠, z=3z = 3⁠.)

Check it with numbers

∣A∣|A| along column 1. 1(7)+3(1)+2(−3)=7+3−6=41(7) + 3(1) + 2(-3) = 7 + 3 - 6 = 4⁠, the same as along row 1.

By elimination. First minus third equation: −x−z=−5-x - z = -5⁠, so x+z=5x + z = 5⁠. Second plus 4 times the first: 7x+3z=237x + 3z = 23⁠. With x=5−zx = 5 - z⁠: 35−7z+3z=2335 - 7z + 3z = 23⁠, so z=3z = 3 and x=2x = 2⁠; then y=x+2z−7=1y = x + 2z - 7 = 1⁠. The same answer.

Common mistakes
  1. Sign of a product of two negatives. In M11M_{11}⁠, (−5)(−1)=+5(-5)(-1) = +5⁠; getting −5-5 gives M11=17M_{11} = 17 and ∣A∣=14|A| = 14⁠, and everything after is wrong.
  2. Using −(−1)-(-1) wrongly in the expansion. The middle term of ∣A∣|A| is +19+19⁠, not −19-19⁠.
  3. Dividing too early. Writing A−1A^{-1} with entries like 74\frac{7}{4}⁠, −194-\frac{19}{4} makes the multiplication by BB much more error-prone.
What to take away
  1. The matrix method works for any nonzero ∣A∣|A|⁠, however small.
  2. Write each minor as ad−bcad - bc with every factor in brackets; most errors are sign errors in these products.
  3. Check A(adj⁡A)=∣A∣ IA(\operatorname{adj} A) = |A|\,I before solving, and the original equations after.

Every fact used, and where it comes from

FactUsed inSource
A system written as AX=BAX = BStep 1Section 4.6.1 (Lesson: solving systems)
Matrix product, row times columnSteps 1, 5, 6Section 3.4.5 (Chapter 3)
Expansion along a row or columnStep 2Section 4.2.3 (Lesson: expanding a 3 × 3 determinant)
Minor and cofactorStep 3Definitions 1 and 2, Section 4.4 (Lesson: minors and cofactors)
adj⁡A\operatorname{adj} A = transpose of [Aij][A_{ij}]Step 4Definition 3, Section 4.5.1 (Lesson: the adjoint)
A(adj⁡A)=∣A∣ IA(\operatorname{adj} A) = |A|\,IStep 5Theorem 1, Section 4.5; Note in Section 4.4
A−1=1∣A∣adj⁡AA^{-1} = \frac{1}{|A|}\operatorname{adj} A when ∣A∣≠0|A| \ne 0Step 4Theorem 4, Section 4.5 (Lesson: inverse of a matrix)
X=A−1BX = A^{-1}B is the unique solutionSteps 2, 6Section 4.6.1, Case I
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →