The question
A school wants to allocate students into three clubs : Sports, Music and Drama, under following conditions :
The number of students in Sports club should be equal to the sum of the number of students in Music and Drama club.
The number of students in Music club should be 20 more than half the number of students in Sports club.
The total number of students to be allocated in all three clubs are 180.
Find the number of students allocated to different clubs, using matrix method.
Exam answer Show all explanations
Let x x x , y y y and z z z be the numbers of students allocated to the Sports, Music and Drama clubs respectively. Then x = y + z x = y + z x = y + z , y = x 2 + 20 y = \frac{x}{2} + 20 y = 2 x + 20 and x + y + z = 180 x + y + z = 180 x + y + z = 180 , that is
x − y − z = 0 x − 2 y = − 40 x + y + z = 180 \begin{aligned} x - y - z &= 0 \\ x - 2y &= -40 \\ x + y + z &= 180 \end{aligned} x − y − z x − 2 y x + y + z = 0 = − 40 = 180
Why?
Turn each condition into an equation. "Sports equals Music plus Drama" gives x = y + z x = y + z x = y + z . "Music is 20 more than half of Sports" gives y = x 2 + 20 y = \frac{x}{2} + 20 y = 2 x + 20 .
Then bring the unknowns to the left side. Multiplying y = x 2 + 20 y = \frac{x}{2} + 20 y = 2 x + 20 by 2 2 2 gives 2 y = x + 40 2y = x + 40 2 y = x + 40 , that is x − 2 y = − 40 x - 2y = -40 x − 2 y = − 40 .
x = y + z x − y − z = 0 y = x 2 + 20 2 y = x + 40 2 y − x = 40 x − 2 y = − 40 ( × − 1 ) \begin{aligned} x &= y + z \\ x - y - z &= 0 \\[4pt] y &= \frac{x}{2} + 20 \\ 2y &= x + 40 \\ 2y - x &= 40 \\ x - 2y &= -40 \quad (\times\, -1) \end{aligned} x x − y − z y 2 y 2 y − x x − 2 y = y + z = 0 = 2 x + 20 = x + 40 = 40 = − 40 ( × − 1 )
These can be written as A X = B AX = B A X = B , where
A = [ 1 − 1 − 1 1 − 2 0 1 1 1 ] A = \begin{bmatrix} 1 & -1 & -1 \\ 1 & -2 & 0 \\ 1 & 1 & 1 \end{bmatrix} A = 1 1 1 − 1 − 2 1 − 1 0 1
X = [ x y z ] , B = [ 0 − 40 180 ] X = \begin{bmatrix} x \\ y \\ z \end{bmatrix},\quad B = \begin{bmatrix} 0 \\ -40 \\ 180 \end{bmatrix} X = x y z , B = 0 − 40 180
Why?
Row i i i of A A A holds the coefficients of x , y , z x, y, z x , y , z in equation i i i , always in that order. The second equation has no z z z , so its coefficient is 0 0 0 . B B B holds the right-hand sides.
∣ A ∣ = 1 ( − 2 − 0 ) + 1 ( 1 − 0 ) − 1 ( 1 + 2 ) = − 2 + 1 − 3 = − 4 ≠ 0 \begin{aligned} |A| &= 1(-2 - 0) + 1(1 - 0) \\ &\quad - 1(1 + 2) \\ &= -2 + 1 - 3 = -4 \ne 0 \end{aligned} ∣ A ∣ = 1 ( − 2 − 0 ) + 1 ( 1 − 0 ) − 1 ( 1 + 2 ) = − 2 + 1 − 3 = − 4 = 0
Why?
Expand along the first row, with the signs + , − , + +, -, + + , − , + :
1 [ ( − 2 ) ( 1 ) − ( 0 ) ( 1 ) ] − ( − 1 ) [ ( 1 ) ( 1 ) − ( 0 ) ( 1 ) ] + ( − 1 ) [ ( 1 ) ( 1 ) − ( − 2 ) ( 1 ) ] \begin{aligned} &1\big[(-2)(1) - (0)(1)\big] \\ &- (-1)\big[(1)(1) - (0)(1)\big] \\ &+ (-1)\big[(1)(1) - (-2)(1)\big] \end{aligned} 1 [ ( − 2 ) ( 1 ) − ( 0 ) ( 1 ) ] − ( − 1 ) [ ( 1 ) ( 1 ) − ( 0 ) ( 1 ) ] + ( − 1 ) [ ( 1 ) ( 1 ) − ( − 2 ) ( 1 ) ]
Each 2 × 2 2 \times 2 2 × 2 determinant is (top left)(bottom right) minus (top right)(bottom left):
∣ − 2 0 1 1 ∣ = ( − 2 ) ( 1 ) − ( 0 ) ( 1 ) = − 2 − 0 = − 2 ∣ 1 0 1 1 ∣ = ( 1 ) ( 1 ) − ( 0 ) ( 1 ) = 1 − 0 = 1 ∣ 1 − 2 1 1 ∣ = ( 1 ) ( 1 ) − ( − 2 ) ( 1 ) = 1 + 2 = 3 \begin{aligned} \begin{vmatrix} -2 & 0 \\ 1 & 1 \end{vmatrix} &= (-2)(1) - (0)(1) \\ &= -2 - 0 = -2 \\[4pt] \begin{vmatrix} 1 & 0 \\ 1 & 1 \end{vmatrix} &= (1)(1) - (0)(1) \\ &= 1 - 0 = 1 \\[4pt] \begin{vmatrix} 1 & -2 \\ 1 & 1 \end{vmatrix} &= (1)(1) - (-2)(1) \\ &= 1 + 2 = 3 \end{aligned} − 2 1 0 1 1 1 0 1 1 1 − 2 1 = ( − 2 ) ( 1 ) − ( 0 ) ( 1 ) = − 2 − 0 = − 2 = ( 1 ) ( 1 ) − ( 0 ) ( 1 ) = 1 − 0 = 1 = ( 1 ) ( 1 ) − ( − 2 ) ( 1 ) = 1 + 2 = 3
Multiply by the entries and their signs, then add:
1 ( − 2 ) = − 2 − ( − 1 ) ( 1 ) = + 1 ( − 1 ) ( 3 ) = − 3 − 2 + 1 = − 1 − 1 − 3 = − 4 \begin{aligned} 1(-2) &= -2 \\ -(-1)(1) &= +1 \\ (-1)(3) &= -3 \\[4pt] -2 + 1 &= -1 \\ -1 - 3 &= -4 \end{aligned} 1 ( − 2 ) − ( − 1 ) ( 1 ) ( − 1 ) ( 3 ) − 2 + 1 − 1 − 3 = − 2 = + 1 = − 3 = − 1 = − 4
Watch out: the middle entry is − 1 -1 − 1 , so its term − ( − 1 ) [ … ] -(-1)[\dots] − ( − 1 ) [ … ] becomes + 1 ( 1 − 0 ) +1(1 - 0) + 1 ( 1 − 0 ) .
So A − 1 A^{-1} A − 1 exists, and the system has a unique solution X = A − 1 B X = A^{-1}B X = A − 1 B .
Why?
A square matrix has an inverse exactly when its determinant is not zero. Multiplying A X = B AX = B A X = B on the left by A − 1 A^{-1} A − 1 gives X = A − 1 B X = A^{-1}B X = A − 1 B , so there is exactly one solution.
Cofactors: A 11 = − 2 A_{11} = -2 A 11 = − 2 , A 12 = − 1 A_{12} = -1 A 12 = − 1 , A 13 = 3 A_{13} = 3 A 13 = 3 , A 21 = 0 A_{21} = 0 A 21 = 0 , A 22 = 2 A_{22} = 2 A 22 = 2 , A 23 = − 2 A_{23} = -2 A 23 = − 2 , A 31 = − 2 A_{31} = -2 A 31 = − 2 , A 32 = − 1 A_{32} = -1 A 32 = − 1 , A 33 = − 1 A_{33} = -1 A 33 = − 1 .
Why?
The cofactor is A i j = ( − 1 ) i + j M i j A_{ij} = (-1)^{i + j}M_{ij} A ij = ( − 1 ) i + j M ij , where the minor M i j M_{ij} M ij is the determinant left after deleting row i i i and column j j j . The signs ( − 1 ) i + j (-1)^{i + j} ( − 1 ) i + j follow the pattern
[ + − + − + − + − + ] on A = [ 1 − 1 − 1 1 − 2 0 1 1 1 ] \begin{bmatrix} + & - & + \\ - & + & - \\ + & - & + \end{bmatrix}\ \text{ on }\ A = \begin{bmatrix} 1 & -1 & -1 \\ 1 & -2 & 0 \\ 1 & 1 & 1 \end{bmatrix} + − + − + − + − + on A = 1 1 1 − 1 − 2 1 − 1 0 1
Row 1 (cover row 1 and one column each time):
A 11 = + ∣ − 2 0 1 1 ∣ = + ( ( − 2 ) ( 1 ) − ( 0 ) ( 1 ) ) = + ( − 2 − 0 ) = − 2 A 12 = − ∣ 1 0 1 1 ∣ = − ( ( 1 ) ( 1 ) − ( 0 ) ( 1 ) ) = − ( 1 − 0 ) = − 1 A 13 = + ∣ 1 − 2 1 1 ∣ = + ( ( 1 ) ( 1 ) − ( − 2 ) ( 1 ) ) = + ( 1 + 2 ) = 3 \begin{aligned} A_{11} &= +\begin{vmatrix} -2 & 0 \\ 1 & 1 \end{vmatrix} \\ &= +\big((-2)(1) - (0)(1)\big) \\ &= +(-2 - 0) = -2 \\[4pt] A_{12} &= -\begin{vmatrix} 1 & 0 \\ 1 & 1 \end{vmatrix} \\ &= -\big((1)(1) - (0)(1)\big) \\ &= -(1 - 0) = -1 \\[4pt] A_{13} &= +\begin{vmatrix} 1 & -2 \\ 1 & 1 \end{vmatrix} \\ &= +\big((1)(1) - (-2)(1)\big) \\ &= +(1 + 2) = 3 \end{aligned} A 11 A 12 A 13 = + − 2 1 0 1 = + ( ( − 2 ) ( 1 ) − ( 0 ) ( 1 ) ) = + ( − 2 − 0 ) = − 2 = − 1 1 0 1 = − ( ( 1 ) ( 1 ) − ( 0 ) ( 1 ) ) = − ( 1 − 0 ) = − 1 = + 1 1 − 2 1 = + ( ( 1 ) ( 1 ) − ( − 2 ) ( 1 ) ) = + ( 1 + 2 ) = 3
Row 2 (cover row 2):
A 21 = − ∣ − 1 − 1 1 1 ∣ = − ( ( − 1 ) ( 1 ) − ( − 1 ) ( 1 ) ) = − ( − 1 + 1 ) = − ( 0 ) = 0 A 22 = + ∣ 1 − 1 1 1 ∣ = + ( ( 1 ) ( 1 ) − ( − 1 ) ( 1 ) ) = + ( 1 + 1 ) = 2 A 23 = − ∣ 1 − 1 1 1 ∣ = − ( ( 1 ) ( 1 ) − ( − 1 ) ( 1 ) ) = − ( 1 + 1 ) = − 2 \begin{aligned} A_{21} &= -\begin{vmatrix} -1 & -1 \\ 1 & 1 \end{vmatrix} \\ &= -\big((-1)(1) - (-1)(1)\big) \\ &= -(-1 + 1) = -(0) = 0 \\[4pt] A_{22} &= +\begin{vmatrix} 1 & -1 \\ 1 & 1 \end{vmatrix} \\ &= +\big((1)(1) - (-1)(1)\big) \\ &= +(1 + 1) = 2 \\[4pt] A_{23} &= -\begin{vmatrix} 1 & -1 \\ 1 & 1 \end{vmatrix} \\ &= -\big((1)(1) - (-1)(1)\big) \\ &= -(1 + 1) = -2 \end{aligned} A 21 A 22 A 23 = − − 1 1 − 1 1 = − ( ( − 1 ) ( 1 ) − ( − 1 ) ( 1 ) ) = − ( − 1 + 1 ) = − ( 0 ) = 0 = + 1 1 − 1 1 = + ( ( 1 ) ( 1 ) − ( − 1 ) ( 1 ) ) = + ( 1 + 1 ) = 2 = − 1 1 − 1 1 = − ( ( 1 ) ( 1 ) − ( − 1 ) ( 1 ) ) = − ( 1 + 1 ) = − 2
Row 3 (cover row 3):
A 31 = + ∣ − 1 − 1 − 2 0 ∣ = + ( ( − 1 ) ( 0 ) − ( − 1 ) ( − 2 ) ) = + ( 0 − 2 ) = − 2 A 32 = − ∣ 1 − 1 1 0 ∣ = − ( ( 1 ) ( 0 ) − ( − 1 ) ( 1 ) ) = − ( 0 + 1 ) = − 1 A 33 = + ∣ 1 − 1 1 − 2 ∣ = + ( ( 1 ) ( − 2 ) − ( − 1 ) ( 1 ) ) = + ( − 2 + 1 ) = − 1 \begin{aligned} A_{31} &= +\begin{vmatrix} -1 & -1 \\ -2 & 0 \end{vmatrix} \\ &= +\big((-1)(0) - (-1)(-2)\big) \\ &= +(0 - 2) = -2 \\[4pt] A_{32} &= -\begin{vmatrix} 1 & -1 \\ 1 & 0 \end{vmatrix} \\ &= -\big((1)(0) - (-1)(1)\big) \\ &= -(0 + 1) = -1 \\[4pt] A_{33} &= +\begin{vmatrix} 1 & -1 \\ 1 & -2 \end{vmatrix} \\ &= +\big((1)(-2) - (-1)(1)\big) \\ &= +(-2 + 1) = -1 \end{aligned} A 31 A 32 A 33 = + − 1 − 2 − 1 0 = + ( ( − 1 ) ( 0 ) − ( − 1 ) ( − 2 ) ) = + ( 0 − 2 ) = − 2 = − 1 1 − 1 0 = − ( ( 1 ) ( 0 ) − ( − 1 ) ( 1 ) ) = − ( 0 + 1 ) = − 1 = + 1 1 − 1 − 2 = + ( ( 1 ) ( − 2 ) − ( − 1 ) ( 1 ) ) = + ( − 2 + 1 ) = − 1
Watch out for the sign pattern: + − + +\ -\ + + − + in rows 1 and 3, and − + − -\ +\ - − + − in row 2.
adj A = [ − 2 0 − 2 − 1 2 − 1 3 − 2 − 1 ] \text{adj}\,A = \begin{bmatrix} -2 & 0 & -2 \\ -1 & 2 & -1 \\ 3 & -2 & -1 \end{bmatrix} adj A = − 2 − 1 3 0 2 − 2 − 2 − 1 − 1
Why?
adj A \text{adj}\,A adj A is the transpose of the matrix of cofactors: the cofactors of row 1 1 1 are written down column 1 1 1 , and so on.
A 11 , A 12 , A 13 = − 2 , − 1 , 3 → col 1 A 21 , A 22 , A 23 = 0 , 2 , − 2 → col 2 A 31 , A 32 , A 33 = − 2 , − 1 , − 1 → col 3 \begin{aligned} A_{11}, A_{12}, A_{13} &= -2,\ -1,\ 3 \to \text{col } 1 \\ A_{21}, A_{22}, A_{23} &= 0,\ 2,\ -2 \to \text{col } 2 \\ A_{31}, A_{32}, A_{33} &= -2,\ -1,\ -1 \to \text{col } 3 \end{aligned} A 11 , A 12 , A 13 A 21 , A 22 , A 23 A 31 , A 32 , A 33 = − 2 , − 1 , 3 → col 1 = 0 , 2 , − 2 → col 2 = − 2 , − 1 , − 1 → col 3
A − 1 = 1 ∣ A ∣ adj A = 1 4 [ 2 0 2 1 − 2 1 − 3 2 1 ] \begin{aligned} A^{-1} &= \frac{1}{|A|}\,\text{adj}\,A \\ &= \frac14\begin{bmatrix} 2 & 0 & 2 \\ 1 & -2 & 1 \\ -3 & 2 & 1 \end{bmatrix} \end{aligned} A − 1 = ∣ A ∣ 1 adj A = 4 1 2 1 − 3 0 − 2 2 2 1 1
Why?
1 ∣ A ∣ = − 1 4 \frac{1}{|A|} = -\frac14 ∣ A ∣ 1 = − 4 1 . Writing it as 1 4 \frac14 4 1 times − 1 -1 − 1 , the − 1 -1 − 1 changes the sign of every entry of adj A \text{adj}\,A adj A .
A − 1 = − 1 4 [ − 2 0 − 2 − 1 2 − 1 3 − 2 − 1 ] = 1 4 [ 2 0 2 1 − 2 1 − 3 2 1 ] \begin{aligned} A^{-1} &= -\frac14\begin{bmatrix} -2 & 0 & -2 \\ -1 & 2 & -1 \\ 3 & -2 & -1 \end{bmatrix} \\ &= \frac14\begin{bmatrix} 2 & 0 & 2 \\ 1 & -2 & 1 \\ -3 & 2 & 1 \end{bmatrix} \end{aligned} A − 1 = − 4 1 − 2 − 1 3 0 2 − 2 − 2 − 1 − 1 = 4 1 2 1 − 3 0 − 2 2 2 1 1
X = A − 1 B = 1 4 [ 2 0 2 1 − 2 1 − 3 2 1 ] [ 0 − 40 180 ] = 1 4 [ 360 260 100 ] = [ 90 65 25 ] \begin{aligned} X &= A^{-1}B \\ &= \frac14\begin{bmatrix} 2 & 0 & 2 \\ 1 & -2 & 1 \\ -3 & 2 & 1 \end{bmatrix}\begin{bmatrix} 0 \\ -40 \\ 180 \end{bmatrix} \\ &= \frac14\begin{bmatrix} 360 \\ 260 \\ 100 \end{bmatrix} = \begin{bmatrix} 90 \\ 65 \\ 25 \end{bmatrix} \end{aligned} X = A − 1 B = 4 1 2 1 − 3 0 − 2 2 2 1 1 0 − 40 180 = 4 1 360 260 100 = 90 65 25
Why?
Multiply each row by the column B B B , entry by entry, and add:
0 + 0 + 360 = 360 0 + 80 + 180 = 260 0 − 80 + 180 = 100 \begin{aligned} 0 + 0 + 360 &= 360 \\ 0 + 80 + 180 &= 260 \\ 0 - 80 + 180 &= 100 \end{aligned} 0 + 0 + 360 0 + 80 + 180 0 − 80 + 180 = 360 = 260 = 100
Each row in full, products first:
Row 1: ( 2 ) ( 0 ) + ( 0 ) ( − 40 ) + ( 2 ) ( 180 ) = 0 + 0 + 360 = 360 Row 2: ( 1 ) ( 0 ) + ( − 2 ) ( − 40 ) + ( 1 ) ( 180 ) = 0 + 80 + 180 = 260 Row 3: ( − 3 ) ( 0 ) + ( 2 ) ( − 40 ) + ( 1 ) ( 180 ) = 0 − 80 + 180 = 100 \begin{aligned} &\text{Row 1: } (2)(0) + (0)(-40) + (2)(180) \\ &= 0 + 0 + 360 = 360 \\[4pt] &\text{Row 2: } (1)(0) + (-2)(-40) + (1)(180) \\ &= 0 + 80 + 180 = 260 \\[4pt] &\text{Row 3: } (-3)(0) + (2)(-40) + (1)(180) \\ &= 0 - 80 + 180 = 100 \end{aligned} Row 1: ( 2 ) ( 0 ) + ( 0 ) ( − 40 ) + ( 2 ) ( 180 ) = 0 + 0 + 360 = 360 Row 2: ( 1 ) ( 0 ) + ( − 2 ) ( − 40 ) + ( 1 ) ( 180 ) = 0 + 80 + 180 = 260 Row 3: ( − 3 ) ( 0 ) + ( 2 ) ( − 40 ) + ( 1 ) ( 180 ) = 0 − 80 + 180 = 100
Then divide each by 4 4 4 .
360 4 = 90 260 4 = 65 100 4 = 25 \begin{aligned} \frac{360}{4} &= 90 \\ \frac{260}{4} &= 65 \\ \frac{100}{4} &= 25 \end{aligned} 4 360 4 260 4 100 = 90 = 65 = 25
So x = 90 x = 90 x = 90 , y = 65 y = 65 y = 65 and z = 25 z = 25 z = 25 .
Why?
Check with the conditions: 65 + 25 = 90 65 + 25 = 90 65 + 25 = 90 ; half of 90 90 90 is 45 45 45 , and 45 + 20 = 65 45 + 20 = 65 45 + 20 = 65 ; 90 + 65 + 25 = 180 90 + 65 + 25 = 180 90 + 65 + 25 = 180 .
x − y − z = 90 − 65 − 25 = 25 − 25 = 0 ✓ x − 2 y = 90 − 2 ( 65 ) = 90 − 130 = − 40 ✓ x + y + z = 90 + 65 + 25 = 155 + 25 = 180 ✓ \begin{aligned} x - y - z &= 90 - 65 - 25 \\ &= 25 - 25 = 0\ \checkmark \\[4pt] x - 2y &= 90 - 2(65) \\ &= 90 - 130 = -40\ \checkmark \\[4pt] x + y + z &= 90 + 65 + 25 \\ &= 155 + 25 = 180\ \checkmark \end{aligned} x − y − z x − 2 y x + y + z = 90 − 65 − 25 = 25 − 25 = 0 ✓ = 90 − 2 ( 65 ) = 90 − 130 = − 40 ✓ = 90 + 65 + 25 = 155 + 25 = 180 ✓
∴ \therefore ∴ The numbers of students allocated to Sports, Music and Drama are 90, 65 and 25 respectively.
Where this comes from Chapter 4, Determinants : System of linear equations by the matrix method.
Question type: Solve equations by the matrix method
How to spot it: click to see Type 9. Solve equations by the matrix method
Spot it: "solve, using the matrix method", with two or three equations. A word problem (prices, three numbers) is the same: write the equations first.
Here: A word problem: Sports x x x , Music y y y , Drama z z z give x − y − z = 0 x - y - z = 0 x − y − z = 0 , x − 2 y = − 40 x - 2y = -40 x − 2 y = − 40 , x + y + z = 180 x + y + z = 180 x + y + z = 180 . Then ∣ A ∣ = − 4 ≠ 0 |A| = -4 \ne 0 ∣ A ∣ = − 4 = 0 , find adj A \operatorname{adj}A adj A , and X = A − 1 B X = A^{-1}B X = A − 1 B gives 90, 65 and 25.
Quick lesson · Worked NCERT solutions · Interactive lesson
Also uses Chapter 3, Matrices .