Example 1
Question: A school canteen sells three items: sandwiches, samosas, and cold drinks. On Monday, 3 sandwiches, 5 samosas, and 2 cold drinks cost ₹85. On Tuesday, 5 sandwiches, 2 samosas, and 4 cold drinks cost ₹100. On Wednesday, 2 sandwiches, 4 samosas, and 3 cold drinks cost ₹75. Using the matrix method, find the cost of one sandwich, one samosa, and one cold drink.
Solution: Let the cost (in ₹) of one sandwich, one samosa, and one cold drink be \(x\), \(y\), and \(z\) respectively. The three equations are: Equation 1: \(3x + 5y + 2z = 85\) Equation 2: \(5x + 2y + 4z = 100\) Equation 3: \(2x + 4y + 3z = 75\) In matrix form \(AX = B\): \[A = \begin{bmatrix} 3 & 5 & 2 \\ 5 & 2 & 4 \\ 2 & 4 & 3 \end{bmatrix}, \quad X = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \quad B = \begin{bmatrix} 85 \\ 100 \\ 75 \end{bmatrix}\] Step 1 — Compute \(\det(A)\): Expanding along the first row: \[\det(A) = 3\begin{vmatrix} 2 & 4 \\ 4 & 3 \end{vmatrix} - 5\begin{vmatrix} 5 & 4 \\ 2 & 3 \end{vmatrix} + 2\begin{vmatrix} 5 & 2 \\ 2 & 4 \end{vmatrix}\] \[= 3(6 - 16) - 5(15 - 8) + 2(20 - 4)\] \[= 3(-10) - 5(7) + 2(16)\] \[= -30 - 35 + 32 = -33\] Since \(\det(A) = -33 \ne 0\), the inverse exists. Step 2 — Compute the cofactors: \(C_{11} = +\begin{vmatrix} 2 & 4 \\ 4 & 3 \end{vmatrix} = 6 - 16 = -10\) \(C_{12} = -\begin{vmatrix} 5 & 4 \\ 2 & 3 \end{vmatrix} = -(15 - 8) = -7\) \(C_{13} = +\begin{vmatrix} 5 & 2 \\ 2 & 4 \end{vmatrix} = 20 - 4 = 16\) \(C_{21} = -\begin{vmatrix} 5 & 2 \\ 4 & 3 \end{vmatrix} = -(15 - 8) = -7\) \(C_{22} = +\begin{vmatrix} 3 & 2 \\ 2 & 3 \end{vmatrix} = 9 - 4 = 5\) \(C_{23} = -\begin{vmatrix} 3 & 5 \\ 2 & 4 \end{vmatrix} = -(12 - 10) = -2\) \(C_{31} = +\begin{vmatrix} 5 & 2 \\ 2 & 4 \end{vmatrix} = 20 - 4 = 16\) \(C_{32} = -\begin{vmatrix} 3 & 2 \\ 5 & 4 \end{vmatrix} = -(12 - 10) = -2\) \(C_{33} = +\begin{vmatrix} 3 & 5 \\ 5 & 2 \end{vmatrix} = 6 - 25 = -19\) Step 3 — Form \(\text{adj}(A)\) (transpose of cofactor matrix): \[\text{adj}(A) = \begin{bmatrix} -10 & -7 & 16 \\ -7 & 5 & -2 \\ 16 & -2 & -19 \end{bmatrix}\] Step 4 — Compute \(A^{-1}\): \[A^{-1} = \frac{1}{-33} \begin{bmatrix} -10 & -7 & 16 \\ -7 & 5 & -2 \\ 16 & -2 & -19 \end{bmatrix}\] Step 5 — Compute \(X = A^{-1}B\): First compute \(\text{adj}(A) \cdot B\): Row 1: \((-10)(85) + (-7)(100) + (16)(75) = -850 - 700 + 1200 = -350\) Row 2: \((-7)(85) + (5)(100) + (-2)(75) = -595 + 500 - 150 = -245\) Row 3: \((16)(85) + (-2)(100) + (-19)(75) = 1360 - 200 - 1425 = -265\) So: \[X = \frac{1}{-33} \begin{bmatrix} -350 \\ -245 \\ -265 \end{bmatrix} = \begin{bmatrix} \frac{350}{33} \\ \frac{245}{33} \\ \frac{265}{33} \end{bmatrix}\] Hmm — these are non-integers, which means a recheck is needed. Let us verify equation consistency by trying \(x = 10, y = 8, z = 5\): Eq 1: \(3(10)+5(8)+2(5) = 30+40+10 = 80 \ne 85\). Let us try \(x = 5, y = 10, z = 5\): Eq 1: \(15+50+10 = 75 \ne 85\). Let us proceed with the exact fractional solution as obtained by the matrix method. \[x = \frac{350}{33}, \quad y = \frac{245}{33}, \quad z = \frac{265}{33}\] Verification using Equation 1: \[3 \cdot \frac{350}{33} + 5 \cdot \frac{245}{33} + 2 \cdot \frac{265}{33} = \frac{1050 + 1225 + 530}{33} = \frac{2805}{33} = 85 \checkmark\] Verification using Equation 2: \[5 \cdot \frac{350}{33} + 2 \cdot \frac{245}{33} + 4 \cdot \frac{265}{33} = \frac{1750 + 490 + 1060}{33} = \frac{3300}{33} = 100 \checkmark\] Verification using Equation 3: \[2 \cdot \frac{350}{33} + 4 \cdot \frac{245}{33} + 3 \cdot \frac{265}{33} = \frac{700 + 980 + 795}{33} = \frac{2475}{33} = 75 \checkmark\]
Answer: Cost of one sandwich = ₹\(\frac{350}{33} \approx ₹10.61\), one samosa = ₹\(\frac{245}{33} \approx ₹7.42\), one cold drink = ₹\(\frac{265}{33} \approx ₹8.03\).
Example 2
Question: A stationery shop sells pens, notebooks, and erasers. On Day 1, a customer buys 2 pens, 3 notebooks, and 1 eraser for ₹41. On Day 2, another customer buys 1 pen, 2 notebooks, and 3 erasers for ₹35. On Day 3, a third customer buys 3 pens, 1 notebook, and 2 erasers for ₹38. Using the matrix method, find the price of one pen, one notebook, and one eraser.
Solution: Let the price (in ₹) of one pen, one notebook, and one eraser be \(x\), \(y\), and \(z\) respectively. The system of equations is: Equation 1: \(2x + 3y + z = 41\) Equation 2: \(x + 2y + 3z = 35\) Equation 3: \(3x + y + 2z = 38\) In matrix form \(AX = B\): \[A = \begin{bmatrix} 2 & 3 & 1 \\ 1 & 2 & 3 \\ 3 & 1 & 2 \end{bmatrix}, \quad X = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \quad B = \begin{bmatrix} 41 \\ 35 \\ 38 \end{bmatrix}\] Step 1 — Compute \(\det(A)\): Expanding along the first row: \[\det(A) = 2\begin{vmatrix} 2 & 3 \\ 1 & 2 \end{vmatrix} - 3\begin{vmatrix} 1 & 3 \\ 3 & 2 \end{vmatrix} + 1\begin{vmatrix} 1 & 2 \\ 3 & 1 \end{vmatrix}\] \[= 2(4 - 3) - 3(2 - 9) + 1(1 - 6)\] \[= 2(1) - 3(-7) + 1(-5)\] \[= 2 + 21 - 5 = 18\] Since \(\det(A) = 18 \ne 0\), the inverse exists. Step 2 — Compute the cofactors: \(C_{11} = +\begin{vmatrix} 2 & 3 \\ 1 & 2 \end{vmatrix} = 4 - 3 = 1\) \(C_{12} = -\begin{vmatrix} 1 & 3 \\ 3 & 2 \end{vmatrix} = -(2 - 9) = 7\) \(C_{13} = +\begin{vmatrix} 1 & 2 \\ 3 & 1 \end{vmatrix} = 1 - 6 = -5\) \(C_{21} = -\begin{vmatrix} 3 & 1 \\ 1 & 2 \end{vmatrix} = -(6 - 1) = -5\) \(C_{22} = +\begin{vmatrix} 2 & 1 \\ 3 & 2 \end{vmatrix} = 4 - 3 = 1\) \(C_{23} = -\begin{vmatrix} 2 & 3 \\ 3 & 1 \end{vmatrix} = -(2 - 9) = 7\) \(C_{31} = +\begin{vmatrix} 3 & 1 \\ 2 & 3 \end{vmatrix} = 9 - 2 = 7\) \(C_{32} = -\begin{vmatrix} 2 & 1 \\ 1 & 3 \end{vmatrix} = -(6 - 1) = -5\) \(C_{33} = +\begin{vmatrix} 2 & 3 \\ 1 & 2 \end{vmatrix} = 4 - 3 = 1\) Step 3 — Form \(\text{adj}(A)\) (transpose of the cofactor matrix): \[\text{adj}(A) = \begin{bmatrix} 1 & -5 & 7 \\ 7 & 1 & -5 \\ -5 & 7 & 1 \end{bmatrix}\] Step 4 — Compute \(A^{-1}\): \[A^{-1} = \frac{1}{18} \begin{bmatrix} 1 & -5 & 7 \\ 7 & 1 & -5 \\ -5 & 7 & 1 \end{bmatrix}\] Step 5 — Compute \(X = A^{-1}B\): First compute \(\text{adj}(A) \cdot B\): Row 1: \((1)(41) + (-5)(35) + (7)(38) = 41 - 175 + 266 = 132\) Row 2: \((7)(41) + (1)(35) + (-5)(38) = 287 + 35 - 190 = 132\) Row 3: \((-5)(41) + (7)(35) + (1)(38) = -205 + 245 + 38 = 78\) So: \[X = \frac{1}{18} \begin{bmatrix} 132 \\ 132 \\ 78 \end{bmatrix} = \begin{bmatrix} \frac{132}{18} \\ \frac{132}{18} \\ \frac{78}{18} \end{bmatrix} = \begin{bmatrix} \frac{22}{3} \\ \frac{22}{3} \\ \frac{13}{3} \end{bmatrix}\] Thus \(x = \frac{22}{3}\), \(y = \frac{22}{3}\), \(z = \frac{13}{3}\). Verification using Equation 1: \[2\left(\frac{22}{3}\right) + 3\left(\frac{22}{3}\right) + 1\left(\frac{13}{3}\right) = \frac{44 + 66 + 13}{3} = \frac{123}{3} = 41 \checkmark\] Verification using Equation 2: \[1\left(\frac{22}{3}\right) + 2\left(\frac{22}{3}\right) + 3\left(\frac{13}{3}\right) = \frac{22 + 44 + 39}{3} = \frac{105}{3} = 35 \checkmark\] Verification using Equation 3: \[3\left(\frac{22}{3}\right) + 1\left(\frac{22}{3}\right) + 2\left(\frac{13}{3}\right) = \frac{66 + 22 + 26}{3} = \frac{114}{3} = 38 \checkmark\]
Answer: Price of one pen = ₹\(\frac{22}{3} \approx ₹7.33\), one notebook = ₹\(\frac{22}{3} \approx ₹7.33\), one eraser = ₹\(\frac{13}{3} \approx ₹4.33\).