Solving Linear Systems with Matrices

Everything in this chapter converges here: determinants decide whether a system of linear equations has a solution, and the inverse computes it.

Consistent system: at least one solution exists. Inconsistent: no solution exists.

The setup: AX=BAX = B

The system a1x+b1y+c1z=d1,a2x+b2y+c2z=d2,a3x+b3y+c3z=d3a_1 x + b_1 y + c_1 z = d_1, \qquad a_2 x + b_2 y + c_2 z = d_2, \qquad a_3 x + b_3 y + c_3 z = d_3 packs into a single matrix equation: (a1b1c1a2b2c2a3b3c3)⏟A(xyz)⏟X=(d1d2d3)⏟B\underbrace{\begin{pmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \end{pmatrix}}_{A}\underbrace{\begin{pmatrix} x \\ y \\ z \end{pmatrix}}_{X} = \underbrace{\begin{pmatrix} d_1 \\ d_2 \\ d_3 \end{pmatrix}}_{B}

AA holds the coefficients, XX the unknowns, BB the constants.

Case I — AA nonsingular: the matrix method

If ∣A∣≠0\vert A \vert \neq 0, premultiply both sides by A−1A^{-1}: A−1(AX)=A−1B  ⇒  (A−1A)X=A−1B  ⇒    X=A−1B  A^{-1}(AX) = A^{-1}B \;\Rightarrow\; (A^{-1}A)X = A^{-1}B \;\Rightarrow\; \boxed{\;X = A^{-1}B\;}

Since the inverse is unique, this solution is unique — the system is consistent with exactly one answer. Watch the order: it is A−1BA^{-1}B, never BA−1BA^{-1} (the orders would not even match).

Case II — AA singular: test with (adj⁡A)B(\operatorname{adj} A)B

If ∣A∣=0\vert A \vert = 0 the inverse does not exist, and the tie-breaker is the product (adj⁡A)B(\operatorname{adj} A)B:

  1. (adj⁡A)B≠O(\operatorname{adj} A)B \neq O: no solution — the system is inconsistent.
  2. (adj⁡A)B=O(\operatorname{adj} A)B = O: the system may be consistent (with infinitely many solutions) or inconsistent — this case does not settle by itself.
∣A∣\vert A \vert (adj⁡A)B(\operatorname{adj} A)B Conclusion
≠0\neq 0 — unique solution X=A−1BX = A^{-1}B
=0= 0 ≠O\neq O inconsistent
=0= 0 =O= O infinitely many solutions or none

(NCERT restricts worked systems to the unique-solution case; the table is what the examiner expects you to quote.)

Solved Examples

Example 1 — A 2×22 \times 2 system by the matrix method

Solve 2x+5y=12x + 5y = 1 and 3x+2y=73x + 2y = 7.

Step 1 — pack into AX=BAX = B: A=(2532)A = \begin{pmatrix} 2 & 5 \\ 3 & 2 \end{pmatrix}, X=(xy)X = \begin{pmatrix} x \\ y \end{pmatrix}, B=(17)B = \begin{pmatrix} 1 \\ 7 \end{pmatrix}.

Step 2 — check ∣A∣\vert A \vert: 4−15=−11≠04 - 15 = -11 \neq 0 — unique solution guaranteed.

Step 3 — invert and multiply: A−1=−111(2−5−32),X=A−1B=−111(2−35−3+14)=−111(−3311)=(3−1)A^{-1} = -\frac{1}{11}\begin{pmatrix} 2 & -5 \\ -3 & 2 \end{pmatrix}, \qquad X = A^{-1}B = -\frac{1}{11}\begin{pmatrix} 2 - 35 \\ -3 + 14 \end{pmatrix} = -\frac{1}{11}\begin{pmatrix} -33 \\ 11 \end{pmatrix} = \begin{pmatrix} 3 \\ -1 \end{pmatrix}

Answer: x=3x = 3, y=−1y = -1. Check in the second equation: 9−2=79 - 2 = 7. ✓

Example 2 — A 3×33 \times 3 system by the matrix method

Solve 3x−2y+3z=83x - 2y + 3z = 8,   2x+y−z=1\;2x + y - z = 1,   4x−3y+2z=4\;4x - 3y + 2z = 4.

Step 1 — pack: A=(3−2321−14−32)A = \begin{pmatrix} 3 & -2 & 3 \\ 2 & 1 & -1 \\ 4 & -3 & 2 \end{pmatrix}, B=(814)B = \begin{pmatrix} 8 \\ 1 \\ 4 \end{pmatrix}.

Step 2 — determinant: expanding along R1R_1: 3(2−3)+2(4+4)+3(−6−4)=−3+16−30=−17≠03(2 - 3) + 2(4 + 4) + 3(-6 - 4) = -3 + 16 - 30 = -17 \neq 0.

Step 3 — adjoint and inverse: computing the nine cofactors and transposing: adj⁡A=(−1−5−1−8−69−1017),A−1=−117(−1−5−1−8−69−1017)\operatorname{adj} A = \begin{pmatrix} -1 & -5 & -1 \\ -8 & -6 & 9 \\ -10 & 1 & 7 \end{pmatrix}, \qquad A^{-1} = -\frac{1}{17}\begin{pmatrix} -1 & -5 & -1 \\ -8 & -6 & 9 \\ -10 & 1 & 7 \end{pmatrix}

Step 4 — multiply: X=A−1B=−117(−8−5−4−64−6+36−80+1+28)=−117(−17−34−51)=(123)X = A^{-1}B = -\frac{1}{17}\begin{pmatrix} -8 - 5 - 4 \\ -64 - 6 + 36 \\ -80 + 1 + 28 \end{pmatrix} = -\frac{1}{17}\begin{pmatrix} -17 \\ -34 \\ -51 \end{pmatrix} = \begin{pmatrix} 1 \\ 2 \\ 3 \end{pmatrix}

Answer: x=1x = 1, y=2y = 2, z=3z = 3. Check the first equation: 3−4+9=83 - 4 + 9 = 8. ✓

Example 3 — From words to a system

The sum of three numbers is 66. If the third number is multiplied by 33 and the second is added, the result is 1111. Adding the first and third numbers gives double the second. Find the numbers by the matrix method.

Step 1 — translate: with numbers x,y,zx, y, z: x+y+z=6,y+3z=11,x+z=2y  ⇒  x−2y+z=0x + y + z = 6, \qquad y + 3z = 11, \qquad x + z = 2y \;\Rightarrow\; x - 2y + z = 0

Step 2 — pack and test: A=(1110131−21)A = \begin{pmatrix} 1 & 1 & 1 \\ 0 & 1 & 3 \\ 1 & -2 & 1 \end{pmatrix}; expanding, ∣A∣=1(1+6)−1(0−3)+1(0−1)=7+3−1=9≠0\vert A \vert = 1(1 + 6) - 1(0 - 3) + 1(0 - 1) = 7 + 3 - 1 = 9 \neq 0.

Step 3 — solve X=A−1BX = A^{-1}B with B=(6,11,0)′B = (6, 11, 0)^{\prime}: the computation gives X=(1,2,3)′X = (1, 2, 3)^{\prime}.

Answer: the numbers are 11, 22 and 33. Check the second condition: 2+3(3)=112 + 3(3) = 11. ✓

Example 4 — Detecting an inconsistent system

Examine the consistency of x+3y=5x + 3y = 5 and 2x+6y=82x + 6y = 8.

Step 1 — determinant: A=(1326)A = \begin{pmatrix} 1 & 3 \\ 2 & 6 \end{pmatrix}, ∣A∣=6−6=0\vert A \vert = 6 - 6 = 0 — the matrix method stops here; move to the adjoint test.

Step 2 — compute (adj⁡A)B(\operatorname{adj} A)B: (adj⁡A)B=(6−3−21)(58)=(30−24−10+8)=(6−2)≠O(\operatorname{adj} A)B = \begin{pmatrix} 6 & -3 \\ -2 & 1 \end{pmatrix}\begin{pmatrix} 5 \\ 8 \end{pmatrix} = \begin{pmatrix} 30 - 24 \\ -10 + 8 \end{pmatrix} = \begin{pmatrix} 6 \\ -2 \end{pmatrix} \neq O

Answer: inconsistent — no solution. Geometrically the two equations are parallel lines: doubling the first gives 2x+6y=102x + 6y = 10, which contradicts 2x+6y=82x + 6y = 8.