Systems of Linear Equations: Cramer's Rule and Consistency
A system of linear equations either has exactly one solution, infinitely many, or none at all. Determinants tell you quickly which case you are in, Cramer's rule and the inverse method find the unique solution, and the idea of rank settles the harder cases where the determinant is zero. Questions on 'for what value of k' and on homogeneous systems appear every year in ECAT, NUST NET, JEE Main and board papers.
Asked in: ECAT, NUST NET, JEE Main, FSc and Class 11-12 boards
Matrix form and the three possible outcomes
A system such as aβx + bβy + cβz = dβ, aβx + bβy + cβz = dβ, aβx + bβy + cβz = dβ is written AX = B, where A is the coefficient matrix, X the column of unknowns and B the column of constants. The augmented matrix [A | B] is A with B attached as an extra column.
A system with at least one solution is consistent; it has either a unique solution or infinitely many. A system with no solution is inconsistent. Two linear equations can never have exactly two solutions: if two different solutions exist, every point on the line through them is also a solution.
- AX = B, with A the coefficient matrix
- Consistent: unique solution or infinitely many
- Inconsistent: no solution
Cramer's rule
Let D = det A. Form Dx by replacing the x-column of A with the constants, and similarly Dy and Dz. If D β 0, the system has the unique solution x = Dx/D, y = Dy/D, z = Dz/D.
Cramer's rule is fastest for 2 Γ 2 systems and for 3 Γ 3 systems where you only need one unknown. It cannot be used to find a solution when D = 0.
- x = Dx/D, y = Dy/D, z = Dz/D (D β 0)
- 2 Γ 2: for aβx + bβy = cβ, aβx + bβy = cβ, D = aβbβ β aβbβ, Dx = cβbβ β cβbβ, Dy = aβcβ β aβcβ
Two equations in two unknowns: the ratio test
Each equation is a line. If aβ/aβ β bβ/bβ the lines cross at one point (unique solution). If aβ/aβ = bβ/bβ β cβ/cβ the lines are parallel (no solution). If all three ratios are equal the lines coincide (infinitely many solutions).
In determinant language: D β 0 gives a unique solution; D = 0 with Dx or Dy non-zero gives no solution; D = Dx = Dy = 0 gives infinitely many (for two equations in two unknowns, not both trivial).
- Unique: aβ/aβ β bβ/bβ
- No solution: aβ/aβ = bβ/bβ β cβ/cβ
- Infinitely many: aβ/aβ = bβ/bβ = cβ/cβ
When D = 0 for three equations
If D = 0 and at least one of Dx, Dy, Dz is non-zero, the system is inconsistent. If D = Dx = Dy = Dz = 0, the system may have infinitely many solutions or none, so you must check further, usually by elimination.
In the inverse method X = Aβ»ΒΉB = (adj A)B/|A|. When |A| = 0: if (adj A)B β O the system is inconsistent; if (adj A)B = O it is either inconsistent or has infinitely many solutions.
- D β 0: unique solution X = Aβ»ΒΉB
- D = 0 and some Dα΅’ β 0: no solution
- D = Dx = Dy = Dz = 0: infinitely many or none (check by elimination)
Rank and row reduction
The rank of a matrix is the number of non-zero rows left after reducing it to echelon form by row operations (equivalently, the order of its largest non-zero minor). Reduce the augmented matrix [A | B] and compare ranks.
If rank A β rank [A | B] the system is inconsistent. If both ranks equal the number of unknowns n, the solution is unique. If both equal r with r less than n, there are infinitely many solutions with n β r free parameters.
- rank A β rank [A | B]: no solution
- rank A = rank [A | B] = n: unique solution
- rank A = rank [A | B] = r, r less than n: infinitely many, n β r free parameters
Homogeneous systems
A system AX = O (all constants zero) is homogeneous. It is always consistent, because x = y = z = 0 (the trivial solution) works.
If |A| β 0 the trivial solution is the only one. A non-trivial solution exists exactly when |A| = 0, and then there are infinitely many solutions, all multiples of one (or more) basic solutions.
- AX = O is always consistent
- |A| β 0: only x = y = z = 0
- |A| = 0: infinitely many (non-trivial) solutions
Solved examples
- Solve by Cramer's rule: 4x β 3y = 5 and 3x + 2y = 8.
- D = 4(2) β 3(β3) = 8 + 9 = 17.
- Dx = 5(2) β 8(β3) = 10 + 24 = 34 and Dy = 4(8) β 3(5) = 32 β 15 = 17.
- x = 34/17 = 2 and y = 17/17 = 1.
- Check: 4(2) β 3(1) = 5 and 3(2) + 2(1) = 8.
Answer: x = 2, y = 1 - Solve by Cramer's rule: 2x β y + z = 3, x + 3y β 2z = 1, 3x + y β z = 2.
- D = det [[2, β1, 1], [1, 3, β2], [3, 1, β1]] = 2(β3 + 2) + 1(β1 + 6) + 1(1 β 9) = β2 + 5 β 8 = β5.
- Replacing columns by (3, 1, 2): Dx = β5, Dy = β10, Dz = β15.
- x = β5/β5 = 1, y = β10/β5 = 2, z = β15/β5 = 3.
- Check in the first equation: 2 β 2 + 3 = 3.
Answer: x = 1, y = 2, z = 3 - For the system x + 2y = 3 and 3x + ky = m, find the conditions on k and m for (a) a unique solution, (b) infinitely many solutions, (c) no solution.
- D = k β 6. A unique solution needs D β 0, so k β 6.
- If k = 6, the ratios of the x and y coefficients are 1/3 and 2/6, both equal to 1/3.
- Infinitely many solutions need the constants in the same ratio: 3/m = 1/3, so m = 9.
- If k = 6 and m β 9 the lines are parallel and distinct, so there is no solution.
Answer: (a) k β 6; (b) k = 6 and m = 9; (c) k = 6 and m β 9 - Discuss the system x + y + z = 4, x + 3y + 2z = 7, x + 5y + Ξ»z = ΞΌ for all values of Ξ» and ΞΌ.
- Subtract the first equation from the others: 2y + z = 3 and 4y + (Ξ» β 1)z = ΞΌ β 4.
- Subtract twice the first of these from the second: (Ξ» β 3)z = ΞΌ β 10.
- If Ξ» β 3, z = (ΞΌ β 10)/(Ξ» β 3) and back-substitution gives a unique solution.
- If Ξ» = 3 and ΞΌ = 10 the last equation is 0 = 0, so there are infinitely many solutions; if Ξ» = 3 and ΞΌ β 10 it reads 0 = non-zero, so there is no solution.
Answer: Unique if Ξ» β 3; infinitely many if Ξ» = 3, ΞΌ = 10; none if Ξ» = 3, ΞΌ β 10 - Use ranks to decide the nature of the system x + 2y β z = 1, 2x + 4y β 2z = 2, 3x + y + z = 4, and solve it.
- The second equation is twice the first, so after row reduction [A | B] has only two non-zero rows: rank A = rank [A | B] = 2.
- There are 3 unknowns, so the system is consistent with infinitely many solutions and 3 β 2 = 1 free parameter.
- Put z = t: x + 2y = 1 + t and 3x + y = 4 β t. Solving, x = (7 β 3t)/5 and y = (4t β 1)/5.
- Check in the first equation: (7 β 3t)/5 + 2(4t β 1)/5 β t = (5 + 5t β 5t)/5 = 1.
Answer: Infinitely many: x = (7 β 3t)/5, y = (4t β 1)/5, z = t - Find k so that the system x + y + z = 0, 2x β y + kz = 0, x + 2y β z = 0 has a non-trivial solution, and find that solution.
- A homogeneous system has a non-trivial solution only when det A = 0.
- det [[1, 1, 1], [2, β1, k], [1, 2, β1]] = 1(1 β 2k) β 1(β2 β k) + 1(4 + 1) = 8 β k. So k = 8.
- From the first and third equations, subtracting gives y β 2z = 0, so y = 2z and then x = βy β z = β3z.
- Check in the second: 2(β3z) β 2z + 8z = 0. Taking z = t gives (x, y, z) = t(β3, 2, 1).
Answer: k = 8; (x, y, z) = t(β3, 2, 1) for any t
Exam shortcuts
- For a 3 Γ 3 system where only one unknown is asked, compute just D and that one Dα΅’; there is no need to find the others.
- In 'for what k' questions, set D = 0 first. That value of k is where the system stops having a unique solution; then test the constants to separate 'none' from 'infinitely many'.
- For two equations, compare aβ/aβ, bβ/bβ and cβ/cβ instead of computing determinants.
- A homogeneous system can never be inconsistent. Questions on homogeneous systems are really asking when det A = 0.
- If one equation is a combination of the others (for example twice the first), the rank drops and you immediately know a solution is not unique.
Common mistakes
- Concluding 'infinitely many solutions' from D = Dx = Dy = Dz = 0 in a 3 Γ 3 system; it can still be inconsistent, so check by elimination.
- Replacing the wrong column when forming Dx, Dy or Dz, or forgetting to move the constants to the right-hand side first.
- Saying a homogeneous system with |A| β 0 has no solution; it always has the trivial solution x = y = z = 0.
- Mixing up the cases for two lines: equal coefficient ratios with a different constant ratio mean parallel lines (no solution), not coincident lines.
Practice MCQs
- What is the solution of 3x + y = 7 and x β 2y = 0?
A) x = 1, y = 2
B) x = β2, y = β1
C) x = 2, y = 1
D) x = 2, y = β1
Answer: C) x = 2, y = 1 β D = 3(β2) β 1(1) = β7, Dx = 7(β2) β 0(1) = β14 and Dy = 3(0) β 1(7) = β7, so x = 2 and y = 1. Swapping the values fails x β 2y = 0, the all-negative pair comes from a sign slip in D, and y = β1 fails 3x + y = 7. - For the system 2x + 5y = 1 and 3x β y = 10, what is Dy in Cramer's rule?
A) 23
B) 17
C) β17
D) β51
Answer: B) 17 β Dy replaces the y-column by the constants: det [[2, 1], [3, 10]] = 20 β 3 = 17. β17 is D itself, β51 is Dx, and 23 adds 20 + 3 instead of subtracting. (The solution is x = 3, y = β1.) - Ali buys 3 kg of apples and 2 kg of bananas for Rs 760. Priya buys 2 kg of apples and 5 kg of bananas for Rs 800. What is the price of 1 kg of apples?
A) Rs 180
B) Rs 80
C) Rs 200
D) Rs 160
Answer: C) Rs 200 β 3a + 2b = 760 and 2a + 5b = 800 give D = 15 β 4 = 11 and Da = 760(5) β 800(2) = 2200, so a = 200. Rs 80 is the price of bananas, and Rs 160 and Rs 180 do not satisfy both equations (for example 3(160) + 2(80) = 640, not 760). - How many solutions does the pair 2x + 3y = 5 and 4x + 6y = 9 have?
A) None
B) Exactly two
C) Exactly one
D) Infinitely many
Answer: A) None β The ratios 2/4 = 3/6 = 1/2 are equal but 5/9 is different, so the lines are parallel and distinct: no solution. Exactly one would need unequal coefficient ratios, infinitely many would need 5/9 to equal 1/2 as well, and two straight lines can never meet in exactly two points. - For what value of k does the system kx + 4y = 8, 3x + 6y = 12 have infinitely many solutions?
A) 2
B) 3
C) β2
D) 6
Answer: A) 2 β We need k/3 = 4/6 = 8/12. Since 4/6 = 8/12 = 2/3, k/3 = 2/3 gives k = 2. k = 3 and k = 6 make D non-zero, so the solution is unique, and k = β2 also gives D = β24, a unique solution. - A system of three linear equations in three unknowns has rank A = 2 and rank [A | B] = 3. The system has:
A) a unique solution
B) no solution
C) only the trivial solution
D) infinitely many solutions
Answer: B) no solution β When rank A differs from rank [A | B], the constants cannot be matched by any combination of the equations, so the system is inconsistent. A unique solution needs both ranks equal to 3, infinitely many needs both ranks equal, and 'trivial solution' applies only to homogeneous systems, which are never inconsistent. - Using Cramer's rule for x + y + z = 2, 2x β y + 3z = 8, x + 2y β z = β1, the values of D and Dx are:
A) D = 5, Dx = 2
B) D = 5, Dx = β10
C) D = β5, Dx = 10
D) D = 5, Dx = 10
Answer: D) D = 5, Dx = 10 β D = 1(1 β 6) β 1(β2 β 3) + 1(4 + 1) = β5 + 5 + 5 = 5. Dx = det [[2, 1, 1], [8, β1, 3], [β1, 2, β1]] = 2(β5) β 1(β5) + 1(15) = 10, so x = 2. A sign slip in the middle cofactor gives β5 or β10, and Dx = 2 confuses Dx with the value of x. - What is the rank of the matrix [[1, 2, 3], [2, 4, 6], [1, 1, 1]]?
A) 0
B) 2
C) 1
D) 3
Answer: B) 2 β The second row is twice the first, so the determinant is 0 and the rank is less than 3. The first and third rows are not multiples of each other, so two independent rows remain: rank 2. Rank 1 would need every row to be a multiple of one row, rank 3 needs a non-zero determinant, and rank 0 is only for the zero matrix. - For a consistent system of 3 equations in 3 unknowns with rank A = rank [A | B] = 2, the solution set is:
A) infinitely many solutions with two free parameters
B) infinitely many solutions with one free parameter
C) a unique solution
D) empty
Answer: B) infinitely many solutions with one free parameter β Equal ranks mean the system is consistent, and the number of free parameters is n β r = 3 β 2 = 1. Two free parameters would need rank 1, a unique solution needs rank 3, and an empty set needs the two ranks to differ. - The system x + y + z = 1, x + 2y + 3z = 2, x + 3y + Ξ»z = ΞΌ has no solution when:
A) Ξ» = 5 and ΞΌ = 3
B) Ξ» β 5 and ΞΌ = 3
C) Ξ» = 3 and ΞΌ β 5
D) Ξ» = 5 and ΞΌ β 3
Answer: D) Ξ» = 5 and ΞΌ β 3 β Eliminating x gives y + 2z = 1 and 2y + (Ξ» β 1)z = ΞΌ β 1; eliminating y then gives (Ξ» β 5)z = ΞΌ β 3. With Ξ» = 5 and ΞΌ β 3 this reads 0 = non-zero, so there is no solution. Ξ» = 5, ΞΌ = 3 gives 0 = 0 (infinitely many), Ξ» β 5 gives a unique solution, and Ξ» = 3 also gives a unique solution because Ξ» β 5 β 0. - Solving 5x + 2y = 3 and 7x + 3y = 5 by the inverse method gives:
A) x = 25, y = 36
B) x = 1, y = β1
C) x = β1, y = 4
D) x = β1, y = β4
Answer: C) x = β1, y = 4 β |A| = 15 β 14 = 1, so Aβ»ΒΉ = [[3, β2], [β7, 5]] and X = Aβ»ΒΉB gives x = 9 β 10 = β1, y = β21 + 25 = 4. x = 1, y = β1 fails the second equation, y = β4 has a sign slip, and 25, 36 come from multiplying B by A instead of Aβ»ΒΉ. - For what value of k does the system 2x + y β z = 0, x β y + 2z = 0, kx + 2y + z = 0 have a non-trivial solution?
A) 13
B) β13
C) 7
D) 1
Answer: A) 13 β A non-trivial solution needs det A = 0. Expanding, det = 2(β1 β 4) β 1(1 β 2k) β 1(2 + k) = β10 β 1 + 2k β 2 β k = k β 13, so k = 13. β13 comes from a sign slip in the expansion, and 7 and 1 give non-zero determinants (β6 and β12), so only the trivial solution exists for them. - For the homogeneous system x + 2y + z = 0, 2x + 3y + 4z = 0, 3x + 5y + 5z = 0, which statement is true?
A) It has no solution
B) It has exactly two solutions
C) It has only the trivial solution
D) It has infinitely many solutions
Answer: D) It has infinitely many solutions β The third equation is the sum of the first two, so det A = 0 and the homogeneous system has non-trivial solutions, hence infinitely many. Only the trivial solution would need det A β 0, a homogeneous system always has at least x = y = z = 0, and a linear system never has exactly two solutions. - For which values of a and b does x + y + z = 6, x + 2y + 3z = 14, 2x + 5y + az = b have infinitely many solutions?
A) a = 8, b = 36
B) a = 36, b = 8
C) a = 8, b = 30
D) a = 6, b = 36
Answer: A) a = 8, b = 36 β Subtracting gives y + 2z = 8 and 3y + (a β 2)z = b β 12; then subtracting three times the first gives (a β 8)z = b β 36. Infinitely many solutions need 0 = 0, so a = 8 and b = 36. With a = 8, b = 30 the last row is 0 = β6 (no solution), a = 6 gives a unique solution, and swapping the values is a misreading. - For which values of k does the system kx + y + z = 0, x + ky + z = 0, x + y + kz = 0 have non-trivial solutions?
A) k = β1 or k = 2
B) k = 1 only
C) k = 1 or k = β2
D) k = β2 only
Answer: C) k = 1 or k = β2 β det A = kΒ³ β 3k + 2 = (k β 1)Β²(k + 2), which is zero for k = 1 and k = β2. Both give non-trivial solutions (k = 1 makes all three equations x + y + z = 0). The pair β1 and 2 has the signs of the roots reversed, and listing only one value misses a root of the cubic.
Questions
Can I use Cramer's rule when D = 0?
No. When D = 0 the formulas x = Dx/D and so on break down. Use the values of Dx, Dy, Dz or row reduction to decide whether there is no solution or infinitely many.
Is rank in the FSc and Class 12 syllabus?
The determinant tests and Cramer's rule are core in both. Rank and echelon form appear in FSc and in many entry-test questions, and they are the cleanest way to handle the D = 0 cases, so it is worth learning.
Why does a homogeneous system always have a solution?
Because putting every unknown equal to zero makes each left side zero, which matches the zero right side. The real question is whether other solutions exist, and that happens exactly when det A = 0.
What does 'one free parameter' mean?
It means one unknown can be chosen freely, say z = t, and the others are then fixed in terms of t. Geometrically the solutions form a line; with two free parameters they form a plane.