Math Lab
Home/Class XII/Ch 4/Applications to linear systems

Applications to linear systems

A linear system AX=BAX = B with AA invertible has the unique solution X=A−1BX = A^{-1} B. Two techniques compute this solution: the matrix method, which inverts AA explicitly (using the adjoint), and Cramer's rule, which gives each component of XX directly as a ratio of determinants. Both are theoretically clean. For practical hand computation, Cramer's rule beats the matrix method when the determinants are small.

The matrix method

For AX=BAX = B with det⁡A≠0\det A \neq 0:

X=A−1B=1det⁡A adj(A)⋅B.X = A^{-1} B = \frac{1}{\det A}\,\text{adj}(A) \cdot B.

This was illustrated in the previous subtopic.

Cramer's rule

Let AiA_i denote the matrix obtained by replacing the ii-th column of AA with BB. Then, provided det⁡A≠0\det A \neq 0, the unique solution of AX=BAX = B has

xi=det⁡Aidet⁡A,i=1,2,…,n.x_i = \frac{\det A_i}{\det A}, \quad i = 1, 2, \ldots, n.

This is Cramer's rule. The derivation uses cofactor orthogonality: multiply both sides of AX=BAX = B on the left by adj(A)\text{adj}(A).

Consistency of a system

Given AX=BAX = B:

  • If det⁡A≠0\det A \neq 0, the system has a unique solution.
  • If det⁡A=0\det A = 0 and adj(A)⋅B=0\text{adj}(A) \cdot B = 0 (i.e., each det⁡Ai=0\det A_i = 0), the system has either infinitely many solutions or no solution, depending on rank.
  • If det⁡A=0\det A = 0 but some det⁡Ai≠0\det A_i \neq 0, the system is inconsistent.

For a homogeneous system AX=OAX = O:

  • det⁡A≠0⇒\det A \neq 0 \Rightarrow only the trivial solution X=0X = 0.
  • det⁡A=0⇒\det A = 0 \Rightarrow infinitely many non-trivial solutions.

Worked example: Cramer's rule on a 3×33 \times 3 system

Solve {x+y+z=6x−y+z=22x+y−z=1\begin{cases} x + y + z = 6 \\ x - y + z = 2 \\ 2x + y - z = 1 \end{cases}.

A=(1111−1121−1)A = \begin{pmatrix} 1 & 1 & 1 \\ 1 & -1 & 1 \\ 2 & 1 & -1 \end{pmatrix}, B=(621)B = \begin{pmatrix} 6 \\ 2 \\ 1 \end{pmatrix}.

det⁡A=1(1−1)−1(−1−2)+1(1+2)=0+3+3=6\det A = 1(1 - 1) - 1(-1 - 2) + 1(1 + 2) = 0 + 3 + 3 = 6.

A1A_1: replace column 11 with BB: det⁡(6112−1111−1)=6(1−1)−1(−2−1)+1(2+1)=0+3+3=6\det\begin{pmatrix} 6 & 1 & 1 \\ 2 & -1 & 1 \\ 1 & 1 & -1 \end{pmatrix} = 6(1 - 1) - 1(-2 - 1) + 1(2 + 1) = 0 + 3 + 3 = 6.

A2A_2: det⁡(16112121−1)=1(−2−1)−6(−1−2)+1(1−4)=−3+18−3=12\det\begin{pmatrix} 1 & 6 & 1 \\ 1 & 2 & 1 \\ 2 & 1 & -1 \end{pmatrix} = 1(-2 - 1) - 6(-1 - 2) + 1(1 - 4) = -3 + 18 - 3 = 12.

A3A_3: det⁡(1161−12211)=1(−1−2)−1(1−4)+6(1+2)=−3+3+18=18\det\begin{pmatrix} 1 & 1 & 6 \\ 1 & -1 & 2 \\ 2 & 1 & 1 \end{pmatrix} = 1(-1 - 2) - 1(1 - 4) + 6(1 + 2) = -3 + 3 + 18 = 18.

x=6/6=1,y=12/6=2,z=18/6=3x = 6/6 = 1, y = 12/6 = 2, z = 18/6 = 3.

Verify: 1+2+3=61 + 2 + 3 = 6, 1−2+3=21 - 2 + 3 = 2, 2+2−3=12 + 2 - 3 = 1. ✓\checkmark

Geometric interpretation

A 3×33 \times 3 linear system AX=BAX = B represents three planes in R3\mathbb{R}^3. Their intersection geometry:

  • det⁡A≠0\det A \neq 0: planes meet at a single point.
  • det⁡A=0\det A = 0: planes are mutually parallel, or two coincide, or all three intersect in a line , depending on the specific AA and BB.

Worked examples

Example 1. Solve {2x+3y=5x+2y=3\begin{cases} 2x + 3y = 5 \\ x + 2y = 3 \end{cases} by Cramer.

det⁡A=4−3=1\det A = 4 - 3 = 1. det⁡A1=det⁡(5332)=1\det A_1 = \det\begin{pmatrix} 5 & 3 \\ 3 & 2 \end{pmatrix} = 1. det⁡A2=det⁡(2513)=1\det A_2 = \det\begin{pmatrix} 2 & 5 \\ 1 & 3 \end{pmatrix} = 1. So x=1,y=1x = 1, y = 1.

Example 2. Show that the system {x+y=12x+2y=3\begin{cases} x + y = 1 \\ 2x + 2y = 3 \end{cases} has no solution.

det⁡A=2−2=0\det A = 2 - 2 = 0. det⁡A1=det⁡(1132)=−1≠0\det A_1 = \det\begin{pmatrix} 1 & 1 \\ 3 & 2 \end{pmatrix} = -1 \neq 0. So inconsistent, no solution.

Example 3. Determine kk for which {kx+y=0x+ky=0\begin{cases} kx + y = 0 \\ x + ky = 0 \end{cases} has a non-trivial solution.

Non-trivial iff det⁡A=0\det A = 0: k2−1=0k^2 - 1 = 0, so k=±1k = \pm 1.

Example 4. Solve {x+2y−z=13x−y+2z=42x+y+z=5\begin{cases} x + 2y - z = 1 \\ 3x - y + 2z = 4 \\ 2x + y + z = 5 \end{cases} by Cramer.

det⁡A=1(−1−2)−2(3−4)+(−1)(3+2)=−3+2−5=−6\det A = 1(-1 - 2) - 2(3 - 4) + (-1)(3 + 2) = -3 + 2 - 5 = -6.

det⁡A1=det⁡(12−14−12511)=1(−1−2)−2(4−10)+(−1)(4+5)=−3+12−9=0\det A_1 = \det\begin{pmatrix} 1 & 2 & -1 \\ 4 & -1 & 2 \\ 5 & 1 & 1 \end{pmatrix} = 1(-1 - 2) - 2(4 - 10) + (-1)(4 + 5) = -3 + 12 - 9 = 0.

det⁡A2=det⁡(11−1342251)=1(4−10)−1(3−4)+(−1)(15−8)=−6+1−7=−12\det A_2 = \det\begin{pmatrix} 1 & 1 & -1 \\ 3 & 4 & 2 \\ 2 & 5 & 1 \end{pmatrix} = 1(4 - 10) - 1(3 - 4) + (-1)(15 - 8) = -6 + 1 - 7 = -12.

det⁡A3=det⁡(1213−14215)=1(−5−4)−2(15−8)+(15+2)=−9−14+17=−6\det A_3 = \det\begin{pmatrix} 1 & 2 & 1 \\ 3 & -1 & 4 \\ 2 & 1 & 5 \end{pmatrix} = 1(-5 - 4) - 2(15 - 8) + (15 + 2) = -9 - 14 + 17 = -6.

x=0,y=2,z=1x = 0, y = 2, z = 1.

Verify: 0+4−1=30 + 4 - 1 = 3 , wait that doesn't match. Let me recompute. Equation 1: x+2y−z=1x + 2y - z = 1. With x=0,y=2,z=1x=0, y=2, z=1: 0+4−1=3≠10 + 4 - 1 = 3 \ne 1.

There's an arithmetic error somewhere. Let me reread det⁡A1\det A_1. Expanding along row 1: 1⋅det⁡(−1211)−2⋅det⁡(4251)+(−1)det⁡(4−151)=1(−1−2)−2(4−10)+(−1)(4+5)=−3+12−9=01 \cdot \det\begin{pmatrix} -1 & 2 \\ 1 & 1 \end{pmatrix} - 2 \cdot \det\begin{pmatrix} 4 & 2 \\ 5 & 1 \end{pmatrix} + (-1) \det\begin{pmatrix} 4 & -1 \\ 5 & 1 \end{pmatrix} = 1(-1 - 2) - 2(4 - 10) + (-1)(4 + 5) = -3 + 12 - 9 = 0. OK.

det⁡A2=1(4−10)−1(3−4)−1(15−8)=−6+1−7=−12\det A_2 = 1(4 - 10) - 1(3 - 4) - 1(15 - 8) = -6 + 1 - 7 = -12. OK.

det⁡A3=1(−5−4)−2(15−8)+1(15+2)=−9−14+17=−6\det A_3 = 1(-5 - 4) - 2(15 - 8) + 1(15 + 2) = -9 - 14 + 17 = -6.

x=0/(−6)=0,y=−12/(−6)=2,z=−6/(−6)=1x = 0/(-6) = 0, y = -12/(-6) = 2, z = -6/(-6) = 1.

Verify eq 1: 0+4−1=30 + 4 - 1 = 3. But RHS is 11. So the system has no solution with (0,2,1)(0, 2, 1). Let me reread the system. Actually if det⁡A1\det A_1 is really 00 but det⁡A≠0\det A \ne 0, then x=0x = 0 , but solution should be unique. Let me verify by substituting back into original.

Hmm , let me recompute the determinant of AA. det⁡(12−13−12211)\det\begin{pmatrix} 1 & 2 & -1 \\ 3 & -1 & 2 \\ 2 & 1 & 1 \end{pmatrix}. Expand: 1(−1⋅1−2⋅1)−2(3⋅1−2⋅2)+(−1)(3⋅1−(−1)⋅2)=1(−3)−2(−1)+(−1)(5)=−3+2−5=−61(-1 \cdot 1 - 2 \cdot 1) - 2(3 \cdot 1 - 2 \cdot 2) + (-1)(3 \cdot 1 - (-1) \cdot 2) = 1(-3) - 2(-1) + (-1)(5) = -3 + 2 - 5 = -6. OK.

Let me check det⁡A1\det A_1 again. A1A_1 replaces column 1 with B=(1,4,5)B = (1, 4, 5): det⁡(12−14−12511)=1(−1−2)−2(4−10)+(−1)(4+5)=−3+12−9=0\det\begin{pmatrix} 1 & 2 & -1 \\ 4 & -1 & 2 \\ 5 & 1 & 1 \end{pmatrix} = 1(-1 - 2) - 2(4 - 10) + (-1)(4 + 5) = -3 + 12 - 9 = 0. OK.

So x=0x = 0. Let me actually solve by substitution to verify. From eq 1: z=x+2y−1z = x + 2y - 1. Sub into eq 2: 3x−y+2(x+2y−1)=43x - y + 2(x + 2y - 1) = 4, so 5x+3y=65x + 3y = 6. Sub into eq 3: 2x+y+x+2y−1=52x + y + x + 2y - 1 = 5, so 3x+3y=63x + 3y = 6, i.e., x+y=2x + y = 2.

From these: 5x+3y=65x + 3y = 6 and x+y=2⇒y=2−xx + y = 2 \Rightarrow y = 2 - x. Sub: 5x+3(2−x)=6⇒2x=0⇒x=0,y=2,z=0+4−1=35x + 3(2 - x) = 6 \Rightarrow 2x = 0 \Rightarrow x = 0, y = 2, z = 0 + 4 - 1 = 3.

So z=3z = 3, not 11. Let me recompute det⁡A3\det A_3. A3A_3 replaces column 3 with BB: det⁡(1213−14215)=1(−5−4)−2(15−8)+1(3+2)=−9−14+5=−18\det\begin{pmatrix} 1 & 2 & 1 \\ 3 & -1 & 4 \\ 2 & 1 & 5 \end{pmatrix} = 1(-5 - 4) - 2(15 - 8) + 1(3 + 2) = -9 - 14 + 5 = -18.

So z=−18/−6=3z = -18 / -6 = 3. (I made an arithmetic error before with the last cofactor; it's 3+2=53 + 2 = 5, not 15+215 + 2.)

So solution: x=0,y=2,z=3x = 0, y = 2, z = 3. Verify: 0+4−3=10 + 4 - 3 = 1 ✓\checkmark, 0−2+6=40 - 2 + 6 = 4 ✓\checkmark, 0+2+3=50 + 2 + 3 = 5 ✓\checkmark.

Example 5. Solve {x+y+z=92x+5y+7z=522x+y−z=0\begin{cases} x + y + z = 9 \\ 2x + 5y + 7z = 52 \\ 2x + y - z = 0 \end{cases} using Cramer.

det⁡A=1(5⋅(−1)−7⋅1)−1(2⋅(−1)−7⋅2)+1(2⋅1−5⋅2)=−12+16−8=−4\det A = 1(5 \cdot (-1) - 7 \cdot 1) - 1(2 \cdot (-1) - 7 \cdot 2) + 1(2 \cdot 1 - 5 \cdot 2) = -12 + 16 - 8 = -4.

det⁡A1=det⁡(911525701−1)=9(−5−7)−1(−52−0)+1(52−0)=−108+52+52=−4\det A_1 = \det\begin{pmatrix} 9 & 1 & 1 \\ 52 & 5 & 7 \\ 0 & 1 & -1 \end{pmatrix} = 9(-5 - 7) - 1(-52 - 0) + 1(52 - 0) = -108 + 52 + 52 = -4.

det⁡A2=det⁡(191252720−1)=1(−52−0)−9(−2−14)+1(0−104)=−52+144−104=−12\det A_2 = \det\begin{pmatrix} 1 & 9 & 1 \\ 2 & 52 & 7 \\ 2 & 0 & -1 \end{pmatrix} = 1(-52 - 0) - 9(-2 - 14) + 1(0 - 104) = -52 + 144 - 104 = -12.

det⁡A3=det⁡(1192552210)=1(0−52)−1(0−104)+9(2−10)=−52+104−72=−20\det A_3 = \det\begin{pmatrix} 1 & 1 & 9 \\ 2 & 5 & 52 \\ 2 & 1 & 0 \end{pmatrix} = 1(0 - 52) - 1(0 - 104) + 9(2 - 10) = -52 + 104 - 72 = -20.

x=1,y=3,z=5x = 1, y = 3, z = 5.

Example 6. Show that the homogeneous system {2x+y+z=0x+3y−z=0x+5y+4z=0\begin{cases} 2x + y + z = 0 \\ x + 3y - z = 0 \\ x + 5y + 4z = 0 \end{cases} has only the trivial solution.

det⁡A=2(12+5)−1(4+1)+1(5−3)=34−5+2=31≠0\det A = 2(12 + 5) - 1(4 + 1) + 1(5 - 3) = 34 - 5 + 2 = 31 \neq 0. So X=OX = O is the only solution.

Try it yourself

  1. Solve {3x+4y=105x+6y=16\begin{cases} 3x + 4y = 10 \\ 5x + 6y = 16 \end{cases} by Cramer.
  2. Solve {x+2y+3z=142x+y+z=7x+y+z=6\begin{cases} x + 2y + 3z = 14 \\ 2x + y + z = 7 \\ x + y + z = 6 \end{cases}.
  3. Determine kk such that {3x+y+z=0x+ky+z=0x+y+kz=0\begin{cases} 3x + y + z = 0 \\ x + ky + z = 0 \\ x + y + kz = 0 \end{cases} has a non-trivial solution.
  4. Solve {2x+3y=83x+2y=7\begin{cases} 2x + 3y = 8 \\ 3x + 2y = 7 \end{cases}.
  5. Show that {x+y=12x+2y=4\begin{cases} x + y = 1 \\ 2x + 2y = 4 \end{cases} is inconsistent.
  6. Find values of λ\lambda for which {(λ−1)x+3y+4z=03x+(λ−1)y+4z=04x+3y+(λ−1)z=0\begin{cases} (\lambda - 1) x + 3y + 4z = 0 \\ 3x + (\lambda - 1) y + 4z = 0 \\ 4x + 3y + (\lambda - 1) z = 0 \end{cases} has a non-trivial solution.
  7. Solve {5x−3y+2z=53x+2y+z=2x+y−z=1\begin{cases} 5x - 3y + 2z = 5 \\ 3x + 2y + z = 2 \\ x + y - z = 1 \end{cases}.
  8. Show that {ax+by+c=0a′x+b′y+c′=0a′′x+b′′y+c′′=0\begin{cases} ax + by + c = 0 \\ a' x + b' y + c' = 0 \\ a'' x + b'' y + c'' = 0 \end{cases} has a solution iff det⁡(abca′b′c′a′′b′′c′′)=0\det\begin{pmatrix} a & b & c \\ a' & b' & c' \\ a'' & b'' & c'' \end{pmatrix} = 0.
  9. Determine the number of solutions of {x+y+z=42x+2y+2z=83x+3y+3z=12\begin{cases} x + y + z = 4 \\ 2x + 2y + 2z = 8 \\ 3x + 3y + 3z = 12 \end{cases}.
  10. Solve {3x+y−2z=32x+3y+z=−3x−2y+2z=−2\begin{cases} 3x + y - 2z = 3 \\ 2x + 3y + z = -3 \\ x - 2y + 2z = -2 \end{cases}.
  11. Find λ\lambda if {x−2y=−2λx+4y=4\begin{cases} x - 2y = -2 \\ \lambda x + 4y = 4 \end{cases} has no solution.
  12. Use Cramer to solve {x+y+z=1x+2y+3z=4x+3y+6z=10\begin{cases} x + y + z = 1 \\ x + 2y + 3z = 4 \\ x + 3y + 6z = 10 \end{cases}.
  13. A boat goes 3030 km upstream in 55 hours and 2424 km downstream in 33 hours. Find the speed of the boat and the current. (Set up a linear system.)
  14. Three persons A,B,CA, B, C together collected \rupee 1000\rupee\,1000. AA and BB together collected \rupee 700\rupee\,700. BB and CC collected \rupee 600\rupee\,600. How much did each collect?

Pitfalls / Tricks

  • Cramer's rule applies only when det⁡A≠0\det A \neq 0. For singular AA, use row reduction to check consistency.
  • Always verify your solution by substituting back into the original equations , Cramer's arithmetic is error-prone.
  • Cramer is impractical for large systems; row reduction is the workhorse there.
  • A homogeneous system always has the trivial solution; non-trivial solutions exist iff det⁡A=0\det A = 0.

This concludes Chapter 4. The methods generalise enormously: every later chapter that uses linear systems (vectors, 3D geometry, linear programming) implicitly invokes these results.

Test Your Knowledge

Quick MCQ check on this chapter

Start Quiz →

AI Summary

Summarize this page in your favorite LLM