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=A1BX = 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 detA0\det A \neq 0:

X=A1B=1detAadj(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 detA0\det A \neq 0, the unique solution of AX=BAX = B has

xi=detAidetA,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 detA0\det A \neq 0, the system has a unique solution.
  • If detA=0\det A = 0 and adj(A)B=0\text{adj}(A) \cdot B = 0 (i.e., each detAi=0\det A_i = 0), the system has either infinitely many solutions or no solution, depending on rank.
  • If detA=0\det A = 0 but some detAi0\det A_i \neq 0, the system is inconsistent.

For a homogeneous system AX=OAX = O:

  • detA0\det A \neq 0 \Rightarrow only the trivial solution X=0X = 0.
  • detA=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=6xy+z=22x+yz=1\begin{cases} x + y + z = 6 \\ x - y + z = 2 \\ 2x + y - z = 1 \end{cases}.

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

detA=1(11)1(12)+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(611211111)=6(11)1(21)+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(161121211)=1(21)6(12)+1(14)=3+183=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(116112211)=1(12)1(14)+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, 12+3=21 - 2 + 3 = 2, 2+23=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:

  • detA0\det A \neq 0: planes meet at a single point.
  • detA=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.

detA=43=1\det A = 4 - 3 = 1. detA1=det(5332)=1\det A_1 = \det\begin{pmatrix} 5 & 3 \\ 3 & 2 \end{pmatrix} = 1. detA2=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.

detA=22=0\det A = 2 - 2 = 0. detA1=det(1132)=10\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 detA=0\det A = 0: k21=0k^2 - 1 = 0, so k=±1k = \pm 1.

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

detA=1(12)2(34)+(1)(3+2)=3+25=6\det A = 1(-1 - 2) - 2(3 - 4) + (-1)(3 + 2) = -3 + 2 - 5 = -6.

detA1=det(121412511)=1(12)2(410)+(1)(4+5)=3+129=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.

detA2=det(111342251)=1(410)1(34)+(1)(158)=6+17=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.

detA3=det(121314215)=1(54)2(158)+(15+2)=914+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+41=30 + 4 - 1 = 3 , wait that doesn't match. Let me recompute. Equation 1: x+2yz=1x + 2y - z = 1. With x=0,y=2,z=1x=0, y=2, z=1: 0+41=310 + 4 - 1 = 3 \ne 1.

There's an arithmetic error somewhere. Let me reread detA1\det A_1. Expanding along row 1: 1det(1211)2det(4251)+(1)det(4151)=1(12)2(410)+(1)(4+5)=3+129=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.

detA2=1(410)1(34)1(158)=6+17=12\det A_2 = 1(4 - 10) - 1(3 - 4) - 1(15 - 8) = -6 + 1 - 7 = -12. OK.

detA3=1(54)2(158)+1(15+2)=914+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+41=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 detA1\det A_1 is really 00 but detA0\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(121312211)\det\begin{pmatrix} 1 & 2 & -1 \\ 3 & -1 & 2 \\ 2 & 1 & 1 \end{pmatrix}. Expand: 1(1121)2(3122)+(1)(31(1)2)=1(3)2(1)+(1)(5)=3+25=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 detA1\det A_1 again. A1A_1 replaces column 1 with B=(1,4,5)B = (1, 4, 5): det(121412511)=1(12)2(410)+(1)(4+5)=3+129=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+2y1z = x + 2y - 1. Sub into eq 2: 3xy+2(x+2y1)=43x - y + 2(x + 2y - 1) = 4, so 5x+3y=65x + 3y = 6. Sub into eq 3: 2x+y+x+2y1=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=2y=2xx + y = 2 \Rightarrow y = 2 - x. Sub: 5x+3(2x)=62x=0x=0,y=2,z=0+41=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 detA3\det A_3. A3A_3 replaces column 3 with BB: det(121314215)=1(54)2(158)+1(3+2)=914+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+43=10 + 4 - 3 = 1 \checkmark, 02+6=40 - 2 + 6 = 4 \checkmark, 0+2+3=50 + 2 + 3 = 5 \checkmark.

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

detA=1(5(1)71)1(2(1)72)+1(2152)=12+168=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.

detA1=det(9115257011)=9(57)1(520)+1(520)=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.

detA2=det(1912527201)=1(520)9(214)+1(0104)=52+144104=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.

detA3=det(1192552210)=1(052)1(0104)+9(210)=52+10472=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+3yz=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.

detA=2(12+5)1(4+1)+1(53)=345+2=310\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 {5x3y+2z=53x+2y+z=2x+yz=1\begin{cases} 5x - 3y + 2z = 5 \\ 3x + 2y + z = 2 \\ x + y - z = 1 \end{cases}.
  8. Show that {ax+by+c=0ax+by+c=0ax+by+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(abcabcabc)=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+y2z=32x+3y+z=3x2y+2z=2\begin{cases} 3x + y - 2z = 3 \\ 2x + 3y + z = -3 \\ x - 2y + 2z = -2 \end{cases}.
  11. Find λ\lambda if {x2y=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 \rupee1000\rupee\,1000. AA and BB together collected \rupee700\rupee\,700. BB and CC collected \rupee600\rupee\,600. How much did each collect?

Pitfalls / Tricks

  • Cramer's rule applies only when detA0\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 detA=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.

Practice quiz

Quick check on this topic.

Quiz
Quick check : Applications to linear systems
6 questions · pick the best answer
Q1

Q2

Q3

Q4

Q5

Q6