A linear system AX=B with A invertible has the unique solution X=A−1B. Two techniques compute this solution: the matrix method, which inverts A explicitly (using the adjoint), and Cramer's rule, which gives each component of X 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=B with detA=0:
X=A−1B=detA1adj(A)⋅B.
This was illustrated in the previous subtopic.
Cramer's rule
Let Ai denote the matrix obtained by replacing the i-th column of A with B. Then, provided detA=0, the unique solution of AX=B has
xi=detAdetAi,i=1,2,…,n.
This is Cramer's rule. The derivation uses cofactor orthogonality: multiply both sides of AX=B on the left by adj(A).
Consistency of a system
Given AX=B:
If detA=0, the system has a unique solution.
If detA=0 and adj(A)⋅B=0 (i.e., each detAi=0), the system has either infinitely many solutions or no solution, depending on rank.
If detA=0 but some detAi=0, the system is inconsistent.
For a homogeneous system AX=O:
detA=0⇒ only the trivial solution X=0.
detA=0⇒ infinitely many non-trivial solutions.
Worked example: Cramer's rule on a 3×3 system
Solve ⎩⎨⎧x+y+z=6x−y+z=22x+y−z=1.
A=1121−1111−1, B=621.
detA=1(1−1)−1(−1−2)+1(1+2)=0+3+3=6.
A1: replace column 1 with B: det6211−1111−1=6(1−1)−1(−2−1)+1(2+1)=0+3+3=6.
Verify: 0+4−1=3 , wait that doesn't match. Let me recompute. Equation 1: x+2y−z=1. With x=0,y=2,z=1: 0+4−1=3=1.
There's an arithmetic error somewhere. Let me reread detA1. Expanding along row 1: 1⋅det(−1121)−2⋅det(4521)+(−1)det(45−11)=1(−1−2)−2(4−10)+(−1)(4+5)=−3+12−9=0. OK.
detA2=1(4−10)−1(3−4)−1(15−8)=−6+1−7=−12. OK.
detA3=1(−5−4)−2(15−8)+1(15+2)=−9−14+17=−6.
x=0/(−6)=0,y=−12/(−6)=2,z=−6/(−6)=1.
Verify eq 1: 0+4−1=3. But RHS is 1. So the system has no solution with (0,2,1). Let me reread the system. Actually if detA1 is really 0 but detA=0, then x=0 , but solution should be unique. Let me verify by substituting back into original.
Hmm , let me recompute the determinant of A. det1322−11−121. 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=−6. OK.
Let me check detA1 again. A1 replaces column 1 with B=(1,4,5):
det1452−11−121=1(−1−2)−2(4−10)+(−1)(4+5)=−3+12−9=0. OK.
So x=0. Let me actually solve by substitution to verify. From eq 1: z=x+2y−1. Sub into eq 2: 3x−y+2(x+2y−1)=4, so 5x+3y=6. Sub into eq 3: 2x+y+x+2y−1=5, so 3x+3y=6, i.e., x+y=2.
From these: 5x+3y=6 and x+y=2⇒y=2−x. Sub: 5x+3(2−x)=6⇒2x=0⇒x=0,y=2,z=0+4−1=3.
So z=3, not 1. Let me recompute detA3. A3 replaces column 3 with B:
det1322−11145=1(−5−4)−2(15−8)+1(3+2)=−9−14+5=−18.
So z=−18/−6=3. (I made an arithmetic error before with the last cofactor; it's 3+2=5, not 15+2.)
So solution: x=0,y=2,z=3. Verify: 0+4−3=1✓, 0−2+6=4✓, 0+2+3=5✓.
Example 5. Solve ⎩⎨⎧x+y+z=92x+5y+7z=522x+y−z=0 using Cramer.
Example 6. Show that the homogeneous system ⎩⎨⎧2x+y+z=0x+3y−z=0x+5y+4z=0 has only the trivial solution.
detA=2(12+5)−1(4+1)+1(5−3)=34−5+2=31=0. So X=O is the only solution.
Try it yourself
Solve {3x+4y=105x+6y=16 by Cramer.
Solve ⎩⎨⎧x+2y+3z=142x+y+z=7x+y+z=6.
Determine k such that ⎩⎨⎧3x+y+z=0x+ky+z=0x+y+kz=0 has a non-trivial solution.
Solve {2x+3y=83x+2y=7.
Show that {x+y=12x+2y=4 is inconsistent.
Find values of λ for which ⎩⎨⎧(λ−1)x+3y+4z=03x+(λ−1)y+4z=04x+3y+(λ−1)z=0 has a non-trivial solution.
Solve ⎩⎨⎧5x−3y+2z=53x+2y+z=2x+y−z=1.
Show that ⎩⎨⎧ax+by+c=0a′x+b′y+c′=0a′′x+b′′y+c′′=0 has a solution iff detaa′a′′bb′b′′cc′c′′=0.
Determine the number of solutions of ⎩⎨⎧x+y+z=42x+2y+2z=83x+3y+3z=12.
Solve ⎩⎨⎧3x+y−2z=32x+3y+z=−3x−2y+2z=−2.
Find λ if {x−2y=−2λx+4y=4 has no solution.
Use Cramer to solve ⎩⎨⎧x+y+z=1x+2y+3z=4x+3y+6z=10.
A boat goes 30 km upstream in 5 hours and 24 km downstream in 3 hours. Find the speed of the boat and the current. (Set up a linear system.)
Three persons A,B,C together collected \rupee1000. A and B together collected \rupee700. B and C collected \rupee600. How much did each collect?
Pitfalls / Tricks
Cramer's rule applies only when detA=0. For singular A, 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.
This concludes Chapter 4. The methods generalise enormously: every later chapter that uses linear systems (vectors, 3D geometry, linear programming) implicitly invokes these results.