Example 1
Question: The cost of 3 kg of apples, 2 kg of bananas and 1 kg of mangoes is ₹70. The cost of 2 kg of apples, 1 kg of bananas and 3 kg of mangoes is ₹80. The cost of 1 kg of apples, 3 kg of bananas and 2 kg of mangoes is ₹75. Find the cost per kg of each fruit using the matrix method.
Solution: Let the cost per kg of apples, bananas and mangoes be \(x\), \(y\) and \(z\) (in ₹) respectively. The three equations are: Equation 1: \(3x + 2y + z = 70\) Equation 2: \(2x + y + 3z = 80\) Equation 3: \(x + 3y + 2z = 75\) In matrix form \(AX = B\): \[A = \begin{bmatrix} 3 & 2 & 1 \\ 2 & 1 & 3 \\ 1 & 3 & 2 \end{bmatrix}, \quad X = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \quad B = \begin{bmatrix} 70 \\ 80 \\ 75 \end{bmatrix}\] Computing \(\det(A)\) by expanding along row 1: \[\det(A) = 3\begin{vmatrix} 1 & 3 \\ 3 & 2 \end{vmatrix} - 2\begin{vmatrix} 2 & 3 \\ 1 & 2 \end{vmatrix} + 1\begin{vmatrix} 2 & 1 \\ 1 & 3 \end{vmatrix}\] \[= 3(2 - 9) - 2(4 - 3) + 1(6 - 1)\] \[= 3(-7) - 2(1) + 1(5) = -21 - 2 + 5 = -18\] Since \(\det(A) = -18 \ne 0\), \(A^{-1}\) exists. Now we find the cofactors: \(C_{11} = +\begin{vmatrix} 1 & 3 \\ 3 & 2 \end{vmatrix} = 2 - 9 = -7\) \(C_{12} = -\begin{vmatrix} 2 & 3 \\ 1 & 2 \end{vmatrix} = -(4 - 3) = -1\) \(C_{13} = +\begin{vmatrix} 2 & 1 \\ 1 & 3 \end{vmatrix} = 6 - 1 = 5\) \(C_{21} = -\begin{vmatrix} 2 & 1 \\ 3 & 2 \end{vmatrix} = -(4 - 3) = -1\) \(C_{22} = +\begin{vmatrix} 3 & 1 \\ 1 & 2 \end{vmatrix} = 6 - 1 = 5\) \(C_{23} = -\begin{vmatrix} 3 & 2 \\ 1 & 3 \end{vmatrix} = -(9 - 2) = -7\) \(C_{31} = +\begin{vmatrix} 2 & 1 \\ 1 & 3 \end{vmatrix} = 6 - 1 = 5\) \(C_{32} = -\begin{vmatrix} 3 & 1 \\ 2 & 3 \end{vmatrix} = -(9 - 2) = -7\) \(C_{33} = +\begin{vmatrix} 3 & 2 \\ 2 & 1 \end{vmatrix} = 3 - 4 = -1\) The cofactor matrix is: \[\begin{bmatrix} -7 & -1 & 5 \\ -1 & 5 & -7 \\ 5 & -7 & -1 \end{bmatrix}\] Hence the adjoint (transpose of cofactor matrix) is: \[\text{adj}(A) = \begin{bmatrix} -7 & -1 & 5 \\ -1 & 5 & -7 \\ 5 & -7 & -1 \end{bmatrix}\] (Note: the cofactor matrix here is symmetric, so adj(A) equals the cofactor matrix itself.) Therefore: \[A^{-1} = \frac{1}{-18} \begin{bmatrix} -7 & -1 & 5 \\ -1 & 5 & -7 \\ 5 & -7 & -1 \end{bmatrix}\] Now computing \(X = A^{-1}B\): \[X = \frac{1}{-18} \begin{bmatrix} -7 & -1 & 5 \\ -1 & 5 & -7 \\ 5 & -7 & -1 \end{bmatrix} \begin{bmatrix} 70 \\ 80 \\ 75 \end{bmatrix}\] Row 1: \((-7)(70) + (-1)(80) + (5)(75) = -490 - 80 + 375 = -195\) Row 2: \((-1)(70) + (5)(80) + (-7)(75) = -70 + 400 - 525 = -195\) Row 3: \((5)(70) + (-7)(80) + (-1)(75) = 350 - 560 - 75 = -285\) So: \[X = \frac{1}{-18} \begin{bmatrix} -195 \\ -195 \\ -285 \end{bmatrix} = \begin{bmatrix} \frac{-195}{-18} \\ \frac{-195}{-18} \\ \frac{-285}{-18} \end{bmatrix} = \begin{bmatrix} \frac{195}{18} \\ \frac{195}{18} \\ \frac{285}{18} \end{bmatrix}\] Simplifying each value: \(x = \frac{195}{18} = \frac{65}{6} \approx 10.83\) \(y = \frac{195}{18} = \frac{65}{6} \approx 10.83\) \(z = \frac{285}{18} = \frac{95}{6} \approx 15.83\) Let us verify with Equation 1: \(3 \cdot \frac{65}{6} + 2 \cdot \frac{65}{6} + \frac{95}{6} = \frac{195 + 130 + 95}{6} = \frac{420}{6} = 70\). Correct. Verify Equation 2: \(2 \cdot \frac{65}{6} + \frac{65}{6} + 3 \cdot \frac{95}{6} = \frac{130 + 65 + 285}{6} = \frac{480}{6} = 80\). Correct. Verify Equation 3: \(\frac{65}{6} + 3 \cdot \frac{65}{6} + 2 \cdot \frac{95}{6} = \frac{65 + 195 + 190}{6} = \frac{450}{6} = 75\). Correct.
Answer: Cost of apples = ₹\(\frac{65}{6}\) per kg ≈ ₹10.83, Cost of bananas = ₹\(\frac{65}{6}\) per kg ≈ ₹10.83, Cost of mangoes = ₹\(\frac{95}{6}\) per kg ≈ ₹15.83
Example 2
Question: A school canteen sells three items: sandwiches, juices and cookies. On Monday, 5 sandwiches, 3 juices and 2 cookies cost ₹110. On Tuesday, 2 sandwiches, 4 juices and 5 cookies cost ₹100. On Wednesday, 3 sandwiches, 2 juices and 4 cookies cost ₹90. Find the price of each item using the matrix method.
Solution: Let the price of one sandwich, one juice and one cookie be \(x\), \(y\) and \(z\) (in ₹) respectively. The three equations are: Equation 1: \(5x + 3y + 2z = 110\) Equation 2: \(2x + 4y + 5z = 100\) Equation 3: \(3x + 2y + 4z = 90\) In matrix form \(AX = B\): \[A = \begin{bmatrix} 5 & 3 & 2 \\ 2 & 4 & 5 \\ 3 & 2 & 4 \end{bmatrix}, \quad X = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \quad B = \begin{bmatrix} 110 \\ 100 \\ 90 \end{bmatrix}\] Computing \(\det(A)\) by expanding along row 1: \[\det(A) = 5\begin{vmatrix} 4 & 5 \\ 2 & 4 \end{vmatrix} - 3\begin{vmatrix} 2 & 5 \\ 3 & 4 \end{vmatrix} + 2\begin{vmatrix} 2 & 4 \\ 3 & 2 \end{vmatrix}\] \[= 5(16 - 10) - 3(8 - 15) + 2(4 - 12)\] \[= 5(6) - 3(-7) + 2(-8) = 30 + 21 - 16 = 35\] Since \(\det(A) = 35 \ne 0\), \(A^{-1}\) exists. Finding all cofactors: \(C_{11} = +\begin{vmatrix} 4 & 5 \\ 2 & 4 \end{vmatrix} = 16 - 10 = 6\) \(C_{12} = -\begin{vmatrix} 2 & 5 \\ 3 & 4 \end{vmatrix} = -(8 - 15) = 7\) \(C_{13} = +\begin{vmatrix} 2 & 4 \\ 3 & 2 \end{vmatrix} = 4 - 12 = -8\) \(C_{21} = -\begin{vmatrix} 3 & 2 \\ 2 & 4 \end{vmatrix} = -(12 - 4) = -8\) \(C_{22} = +\begin{vmatrix} 5 & 2 \\ 3 & 4 \end{vmatrix} = 20 - 6 = 14\) \(C_{23} = -\begin{vmatrix} 5 & 3 \\ 3 & 2 \end{vmatrix} = -(10 - 9) = -1\) \(C_{31} = +\begin{vmatrix} 3 & 2 \\ 4 & 5 \end{vmatrix} = 15 - 8 = 7\) \(C_{32} = -\begin{vmatrix} 5 & 2 \\ 2 & 5 \end{vmatrix} = -(25 - 4) = -21\) \(C_{33} = +\begin{vmatrix} 5 & 3 \\ 2 & 4 \end{vmatrix} = 20 - 6 = 14\) The adjoint (transpose of the cofactor matrix) is: \[\text{adj}(A) = \begin{bmatrix} 6 & -8 & 7 \\ 7 & 14 & -21 \\ -8 & -1 & 14 \end{bmatrix}\] Therefore: \[A^{-1} = \frac{1}{35} \begin{bmatrix} 6 & -8 & 7 \\ 7 & 14 & -21 \\ -8 & -1 & 14 \end{bmatrix}\] Now computing \(X = A^{-1}B\): \[X = \frac{1}{35} \begin{bmatrix} 6 & -8 & 7 \\ 7 & 14 & -21 \\ -8 & -1 & 14 \end{bmatrix} \begin{bmatrix} 110 \\ 100 \\ 90 \end{bmatrix}\] Row 1: \((6)(110) + (-8)(100) + (7)(90) = 660 - 800 + 630 = 490\) Row 2: \((7)(110) + (14)(100) + (-21)(90) = 770 + 1400 - 1890 = 280\) Row 3: \((-8)(110) + (-1)(100) + (14)(90) = -880 - 100 + 1260 = 280\) So: \[X = \frac{1}{35} \begin{bmatrix} 490 \\ 280 \\ 280 \end{bmatrix} = \begin{bmatrix} 14 \\ 8 \\ 8 \end{bmatrix}\] Hence \(x = 14\), \(y = 8\), \(z = 8\). Verification using Equation 1: \(5(14) + 3(8) + 2(8) = 70 + 24 + 16 = 110\). Correct. Verification using Equation 2: \(2(14) + 4(8) + 5(8) = 28 + 32 + 40 = 100\). Correct. Verification using Equation 3: \(3(14) + 2(8) + 4(8) = 42 + 16 + 32 = 90\). Correct.
Answer: Price of one sandwich = ₹14, Price of one juice = ₹8, Price of one cookie = ₹8