Solution:
Key idea: The given matrix equation has the form A X = B AX = B A X = B , with X X X the column of prices.
Since the determinant of A A A is 17 17 17 (not zero), the inverse exists and the prices are given by X = A − 1 B X = A^{-1}B X = A − 1 B .
The inverse is found from A − 1 = 1 ∣ A ∣ adj A A^{-1} = \dfrac{1}{\lvert A \rvert}\operatorname{adj} A A − 1 = ∣ A ∣ 1 adj A .
Step 1 — Name the matrices.
The given equation is A X = B AX = B A X = B with
A = [ 2 3 1 1 2 3 3 1 1 ] , X = [ x y z ] , B = [ 37 26 37 ] A = \begin{bmatrix} 2 & 3 & 1 \\ 1 & 2 & 3 \\ 3 & 1 & 1 \end{bmatrix}, \quad X = \begin{bmatrix} x \\ y \\ z \end{bmatrix}, \quad B = \begin{bmatrix} 37 \\ 26 \\ 37 \end{bmatrix} A = 2 1 3 3 2 1 1 3 1 , X = x y z , B = 37 26 37
Step 2 — Find the cofactors of the entries of A A A .
The cofactor C i j C_{ij} C ij is ( − 1 ) i + j (-1)^{i+j} ( − 1 ) i + j times the minor of the entry in row i i i , column j j j (the 2 × 2 2 \times 2 2 × 2 determinant left after deleting that row and column).
C 11 = + [ ( 2 ) ( 1 ) − ( 3 ) ( 1 ) ] = − 1 C 12 = − [ ( 1 ) ( 1 ) − ( 3 ) ( 3 ) ] = 8 C 13 = + [ ( 1 ) ( 1 ) − ( 2 ) ( 3 ) ] = − 5 C 21 = − [ ( 3 ) ( 1 ) − ( 1 ) ( 1 ) ] = − 2 C 22 = + [ ( 2 ) ( 1 ) − ( 1 ) ( 3 ) ] = − 1 C 23 = − [ ( 2 ) ( 1 ) − ( 3 ) ( 3 ) ] = 7 C 31 = + [ ( 3 ) ( 3 ) − ( 1 ) ( 2 ) ] = 7 C 32 = − [ ( 2 ) ( 3 ) − ( 1 ) ( 1 ) ] = − 5 C 33 = + [ ( 2 ) ( 2 ) − ( 3 ) ( 1 ) ] = 1 \begin{aligned}
C_{11} &= +\left[(2)(1) - (3)(1)\right] \\
&= -1 \\
C_{12} &= -\left[(1)(1) - (3)(3)\right] \\
&= 8 \\
C_{13} &= +\left[(1)(1) - (2)(3)\right] \\
&= -5 \\
C_{21} &= -\left[(3)(1) - (1)(1)\right] \\
&= -2 \\
C_{22} &= +\left[(2)(1) - (1)(3)\right] \\
&= -1 \\
C_{23} &= -\left[(2)(1) - (3)(3)\right] \\
&= 7 \\
C_{31} &= +\left[(3)(3) - (1)(2)\right] \\
&= 7 \\
C_{32} &= -\left[(2)(3) - (1)(1)\right] \\
&= -5 \\
C_{33} &= +\left[(2)(2) - (3)(1)\right] \\
&= 1
\end{aligned} C 11 C 12 C 13 C 21 C 22 C 23 C 31 C 32 C 33 = + [ ( 2 ) ( 1 ) − ( 3 ) ( 1 ) ] = − 1 = − [ ( 1 ) ( 1 ) − ( 3 ) ( 3 ) ] = 8 = + [ ( 1 ) ( 1 ) − ( 2 ) ( 3 ) ] = − 5 = − [ ( 3 ) ( 1 ) − ( 1 ) ( 1 ) ] = − 2 = + [ ( 2 ) ( 1 ) − ( 1 ) ( 3 ) ] = − 1 = − [ ( 2 ) ( 1 ) − ( 3 ) ( 3 ) ] = 7 = + [ ( 3 ) ( 3 ) − ( 1 ) ( 2 ) ] = 7 = − [ ( 2 ) ( 3 ) − ( 1 ) ( 1 ) ] = − 5 = + [ ( 2 ) ( 2 ) − ( 3 ) ( 1 ) ] = 1
Step 3 — Find ∣ A ∣ \lvert A \rvert ∣ A ∣ .
We expand along the first row, multiplying each entry by its cofactor and adding.
∣ A ∣ = ( 2 ) ( − 1 ) + ( 3 ) ( 8 ) + ( 1 ) ( − 5 ) = − 2 + 24 − 5 = 17 \begin{aligned}
\lvert A \rvert &= (2)(-1) + (3)(8) + (1)(-5) \\
&= -2 + 24 - 5 \\
&= 17
\end{aligned} ∣ A ∣ = ( 2 ) ( − 1 ) + ( 3 ) ( 8 ) + ( 1 ) ( − 5 ) = − 2 + 24 − 5 = 17
Since ∣ A ∣ ≠ 0 \lvert A \rvert \neq 0 ∣ A ∣ = 0 , the matrix A A A is non-singular, so A − 1 A^{-1} A − 1 exists and the system has a unique solution.
Step 4 — Write adj A \operatorname{adj} A adj A and A − 1 A^{-1} A − 1 .
The adjoint is the transpose of the matrix of cofactors: the cofactors of row 1 form column 1, and so on.
adj A = [ − 1 − 2 7 8 − 1 − 5 − 5 7 1 ] \operatorname{adj} A = \begin{bmatrix} -1 & -2 & 7 \\ 8 & -1 & -5 \\ -5 & 7 & 1 \end{bmatrix} adj A = − 1 8 − 5 − 2 − 1 7 7 − 5 1
The inverse is the adjoint divided by the determinant.
A − 1 = 1 ∣ A ∣ adj A A^{-1} = \dfrac{1}{\lvert A \rvert}\operatorname{adj} A A − 1 = ∣ A ∣ 1 adj A
A − 1 = 1 17 [ − 1 − 2 7 8 − 1 − 5 − 5 7 1 ] A^{-1} = \dfrac{1}{17}\begin{bmatrix} -1 & -2 & 7 \\ 8 & -1 & -5 \\ -5 & 7 & 1 \end{bmatrix} A − 1 = 17 1 − 1 8 − 5 − 2 − 1 7 7 − 5 1
Step 5 — Find X = A − 1 B X = A^{-1}B X = A − 1 B .
Multiplying both sides of the matrix equation on the left by A − 1 A^{-1} A − 1 leaves X X X alone. We multiply each row of adj A \operatorname{adj} A adj A by the column B B B , then divide by ∣ A ∣ \lvert A \rvert ∣ A ∣ .
X = 1 17 [ − 1 − 2 7 8 − 1 − 5 − 5 7 1 ] [ 37 26 37 ] X = \dfrac{1}{17}\begin{bmatrix} -1 & -2 & 7 \\ 8 & -1 & -5 \\ -5 & 7 & 1 \end{bmatrix}\begin{bmatrix} 37 \\ 26 \\ 37 \end{bmatrix} X = 17 1 − 1 8 − 5 − 2 − 1 7 7 − 5 1 37 26 37
X = 1 17 [ ( − 1 ) ( 37 ) + ( − 2 ) ( 26 ) + ( 7 ) ( 37 ) ( 8 ) ( 37 ) + ( − 1 ) ( 26 ) + ( − 5 ) ( 37 ) ( − 5 ) ( 37 ) + ( 7 ) ( 26 ) + ( 1 ) ( 37 ) ] X = \dfrac{1}{17}\begin{bmatrix} (-1)(37) + (-2)(26) + (7)(37) \\ (8)(37) + (-1)(26) + (-5)(37) \\ (-5)(37) + (7)(26) + (1)(37) \end{bmatrix} X = 17 1 ( − 1 ) ( 37 ) + ( − 2 ) ( 26 ) + ( 7 ) ( 37 ) ( 8 ) ( 37 ) + ( − 1 ) ( 26 ) + ( − 5 ) ( 37 ) ( − 5 ) ( 37 ) + ( 7 ) ( 26 ) + ( 1 ) ( 37 )
X = 1 17 [ 170 85 34 ] X = \dfrac{1}{17}\begin{bmatrix} 170 \\ 85 \\ 34 \end{bmatrix} X = 17 1 170 85 34
X = [ 10 5 2 ] X = \begin{bmatrix} 10 \\ 5 \\ 2 \end{bmatrix} X = 10 5 2
Step 6 — State the prices.
The solution gives x = 10 x = 10 x = 10 , y = 5 y = 5 y = 5 and z = 2 z = 2 z = 2 .
As a check, we work out the revenue on day D1.
2 ( 10 ) + 3 ( 5 ) + 1 ( 2 ) = 37 2(10) + 3(5) + 1(2) = 37 2 ( 10 ) + 3 ( 5 ) + 1 ( 2 ) = 37
This matches the revenue of 37 37 37 given for D1.
Therefore, a sandwich costs ₹ 10, a fruit juice costs ₹ 5 and a cookie costs ₹ 2.