Solveeit Logo

Question

Question: Ramesh buys a half dozen pencils, two erasers, and two sharpeners in a shop and pays 14 rupees. Sure...

Ramesh buys a half dozen pencils, two erasers, and two sharpeners in a shop and pays 14 rupees. Suresh buys 15 pencils, three erasers, 5 erasers, and 5 sharpeners and pays 34 rupees where his friend who accompanied them buys 1 pencil, 1 eraser, and 1 sharpener and pays 3 rupees. Find the price of a pencil, sharpener, and eraser using matrices. $$$$

Explanation

Solution

We assume the price of one pencil as xx, the price of one eraser as yy, and the price of one sharpener as zz. We use the given information and form a 3×33\times 3 linear system of equations AX=BAX=B in matrices. We find the solution X=A1B.X={{A}^{-1}}B.$$$$

Complete step-by-step solution
We know the 3×33\times 3 linear system of equations with three unknowns x,y,zx,y,z represented in matrix form as

& \left[ \begin{matrix} {{a}_{1}} & {{a}_{2}} & {{a}_{3}} \\\ {{b}_{1}} & {{b}_{2}} & {{b}_{3}} \\\ {{c}_{1}} & {{c}_{2}} & {{c}_{3}} \\\ \end{matrix} \right]\left[ \begin{matrix} x \\\ y \\\ z \\\ \end{matrix} \right]=\left[ \begin{matrix} {{d}_{1}} \\\ {{d}_{2}} \\\ {{d}_{3}} \\\ \end{matrix} \right] \\\ & \Rightarrow AX=B \\\ \end{aligned}$$ The solution of the above system of equation is given by $$X={{A}^{-1}}B=\left( \dfrac{1}{\det \left( A \right)}\text{adj}A \right)B$$ Let us assume the price of one pencil as$x$, the price of one eraser as $y$ and the price of one sharpener as $y$. We are given the question that Rajesh buys a half dozen pencils, 2 erasers and 2 sharpeners in a shop and pays 14 rupees. So we have $$6x+2y+2z=14...(1)$$ Suresh buys 15 pencils, three erasers, 5 erasers and 5 sharpeners and pays 34 rupees. So we have $$15x+5y+3z=34....\left( 2 \right)$$ The accompanying friend buys 1 pencil, 1 eraser and 1 sharpener and pays 3 rupees. So we have, $$x+y+z=3......\left( 3 \right)$$ We write equation (1), (2), (3) in matrix from as, $$\begin{aligned} & \left[ \begin{matrix} 6 & 2 & 2 \\\ 15 & 5 & 3 \\\ 1 & 1 & 1 \\\ \end{matrix} \right]\left[ \begin{matrix} x \\\ y \\\ z \\\ \end{matrix} \right]=\left[ \begin{matrix} 14 \\\ 34 \\\ 3 \\\ \end{matrix} \right] \\\ & \Rightarrow AX=B \\\ \end{aligned}$$ We know that the adjoint of the $A$ is the transpose of the cofactor matrix of $A$. The cofactor matrix is matrix where each element ${{a}_{ij}}$ is equal to the determinant value of the matrix formed by rows and columns excluding${{a}_{ij}}$multiplied by ${{\left( -1 \right)}^{i+j}}$for example co-factor of ${{a}_{11}}=6$ is the determinant excluding row-1 first column -1 that is $$C\left( 6 \right)={{\left( -1 \right)}^{11}}\left| \begin{matrix} 5 & 3 \\\ 1 & 1 \\\ \end{matrix} \right|=1\left( 5\times 1-3\times 1 \right)=2$$ Summarily we find the cofactors of the elements in the first row as $$\begin{aligned} & C\left( {{a}_{12}}=2 \right)={{\left( -1 \right)}^{1+2}}\left| \begin{matrix} 15 & 3 \\\ 1 & 1 \\\ \end{matrix} \right|=-1\left( 15-3 \right)=-12 \\\ & C\left( {{a}_{13}}=2 \right)={{\left( -1 \right)}^{1+3}}\left| \begin{matrix} 15 & 5 \\\ 1 & 1 \\\ \end{matrix} \right|=1\left( 15-5 \right)=10 \\\ \end{aligned}$$ The cofactors of the elements in the second row are $$\begin{aligned} & C\left( {{a}_{21}}=15 \right)={{\left( -1 \right)}^{2+1}}\left| \begin{matrix} 2 & 2 \\\ 1 & 1 \\\ \end{matrix} \right|=-1\left( 2-2 \right)=0 \\\ & C\left( {{a}_{22}}=5 \right)={{\left( -1 \right)}^{2+2}}\left| \begin{matrix} 6 & 2 \\\ 1 & 1 \\\ \end{matrix} \right|=1\left( 6-2 \right)=4 \\\ & C\left( {{a}_{23}}=3 \right)={{\left( -1 \right)}^{2+3}}\left| \begin{matrix} 6 & 2 \\\ 1 & 1 \\\ \end{matrix} \right|=-1\left( 6-2 \right)=-4 \\\ \end{aligned}$$ The cofactors of the elements in the third row are $$\begin{aligned} & C\left( {{a}_{31}}=1 \right)={{\left( -1 \right)}^{3+1}}\left| \begin{matrix} 2 & 2 \\\ 5 & 3 \\\ \end{matrix} \right|=1\left( 6-10 \right)=-4 \\\ & C\left( {{a}_{32}}=1 \right)={{\left( -1 \right)}^{3+2}}\left| \begin{matrix} 6 & 2 \\\ 15 & 3 \\\ \end{matrix} \right|=-1\left( 18-30 \right)=12 \\\ & C\left( {{a}_{33}}=1 \right)={{\left( -1 \right)}^{3+3}}\left| \begin{matrix} 6 & 2 \\\ 15 & 5 \\\ \end{matrix} \right|=1\left( 30-30 \right)=0 \\\ \end{aligned}$$ The cofactor matrix of $A$ is $$\text{coeff }\left( A \right)=\left[ \begin{matrix} C\left( 6 \right) & C\left( 2 \right) & C\left( 2 \right) \\\ C\left( 15 \right) & C\left( 5 \right) & C\left( 3 \right) \\\ C\left( 1 \right) & C\left( 1 \right) & C\left( 1 \right) \\\ \end{matrix} \right]=\left[ \begin{matrix} 2 & -12 & 10 \\\ 0 & 4 & -4 \\\ -4 & 12 & 0 \\\ \end{matrix} \right]$$ So the adjoint matrix of $A$ is $$\text{adj}.A={{\left( \text{coeff}.A \right)}^{T}}=\left[ \begin{matrix} 2 & 0 & -4 \\\ -12 & 4 & 12 \\\ 10 & -4 & 0 \\\ \end{matrix} \right]$$ We find the determinant value of matrix $A$ by expanding in third column. We have $$\det \left( A \right)=\left| \begin{matrix} 6 & 2 & 2 \\\ 15 & 5 & 3 \\\ 1 & 1 & 1 \\\ \end{matrix} \right|=1\left( 6-10 \right)-1\left( 18-30 \right)+1\left( 30-30 \right)=8$$ So the solutions are $$X={{A}^{-1}}B=\left( \dfrac{adj.A}{\det \left( A \right)} \right)B=\dfrac{1}{8}\left[ \begin{matrix} 2 & 0 & -4 \\\ -12 & 4 & 12 \\\ 10 & -4 & 0 \\\ \end{matrix} \right]\left[ \begin{matrix} 14 \\\ 34 \\\ 3 \\\ \end{matrix} \right]=\dfrac{1}{8}\left[ \begin{matrix} 16 \\\ 4 \\\ 4 \\\ \end{matrix} \right]=\left[ \begin{matrix} 2 \\\ 0.5 \\\ 0.5 \\\ \end{matrix} \right]$$ **So the price of one pencil is 2 rupees one eraser is 0.5 and one sharpeners is 0.5 rupees.$$$$** **Note:** We can alternatively solve the problem by using Gauss-Jordan elimination of the augmented matrix$\left( A,B \right)$. We can use the same elimination to find inverse in $\left( A,{{A}^{-1}} \right)$.We note that we cannot find a unique solution when$\det \left( A \right)=0$, infinite solution if $\det \left( A \right)=0,\text{adj}A\cdot B=0$ and no solution if $\det \left( A \right)=0,\text{adj}A\cdot B\ne 0$/