Q.1) Chase and Sara went to the candy store. Chase bought 2 pieces of fudge and 1 piece of bubble gum for a total of $32. Sara bought 1 piece of fudge and 3 pieces of bubble gum for a total of $36. What are the prices of each piece of fudge and piece of bubble gum?
Q.2) Solve the following systems of Linear equations using Gauss-Jordan method (show all the steps/part a is a bonus question) a) x+2y-z=1 2x+y+4z=2 3x+3y+4z=1
Q.3) Solve the following system using the Inverse matrix 5x+y=4 2x-3y=5
The correct answer and explanation is:
Solution to Q.1
Let the price of a piece of fudge be FF and the price of a piece of bubble gum be BB. The given equations are: 2F+B=322F + B = 32 F+3B=36F + 3B = 36
Step 1: Solve the system of equations.
- From the first equation: B=32−2FB = 32 – 2F
- Substitute BB into the second equation: F+3(32−2F)=36F + 3(32 – 2F) = 36 F+96−6F=36F + 96 – 6F = 36 −5F+96=36-5F + 96 = 36 −5F=−60-5F = -60 F=12F = 12
- Substitute F=12F = 12 into B=32−2FB = 32 – 2F: B=32−2(12)B = 32 – 2(12) B=8B = 8
Final Answer:
- The price of a piece of fudge is $12.
- The price of a piece of bubble gum is $8.
Solution to Q.2 (Gauss-Jordan Method)
The system of equations is:
- x+2y−z=1x + 2y – z = 1
- 2x+y+4z=22x + y + 4z = 2
- 3x+3y+4z=13x + 3y + 4z = 1
Step 1: Write the augmented matrix
[12−1∣1214∣2334∣1]\begin{bmatrix} 1 & 2 & -1 & | & 1 \\ 2 & 1 & 4 & | & 2 \\ 3 & 3 & 4 & | & 1 \end{bmatrix}
Step 2: Perform row operations to reach reduced row-echelon form.
- R2→R2−2R1R2 \to R2 – 2R1, R3→R3−3R1R3 \to R3 – 3R1: [12−1∣10−36∣00−37∣−2]\begin{bmatrix} 1 & 2 & -1 & | & 1 \\ 0 & -3 & 6 & | & 0 \\ 0 & -3 & 7 & | & -2 \end{bmatrix}
- R3→R3−R2R3 \to R3 – R2: [12−1∣10−36∣0001∣−2]\begin{bmatrix} 1 & 2 & -1 & | & 1 \\ 0 & -3 & 6 & | & 0 \\ 0 & 0 & 1 & | & -2 \end{bmatrix}
- Back-substitute to eliminate zz and yy:
- R2→R2+6R3R2 \to R2 + 6R3
- R1→R1+R3R1 \to R1 + R3
Final matrix: [100∣3010∣−2001∣−2]\begin{bmatrix} 1 & 0 & 0 & | & 3 \\ 0 & 1 & 0 & | & -2 \\ 0 & 0 & 1 & | & -2 \end{bmatrix}
Final Answer:
x=3, y=−2, z=−2x = 3, \, y = -2, \, z = -2
Solution to Q.3 (Using Inverse Matrix)
The system of equations is:
- 5x+y=45x + y = 4
- 2x−3y=52x – 3y = 5
Step 1: Write in matrix form.
A=[512−3],X=[xy],B=[45]\mathbf{A} = \begin{bmatrix} 5 & 1 \\ 2 & -3 \end{bmatrix}, \quad \mathbf{X} = \begin{bmatrix} x \\ y \end{bmatrix}, \quad \mathbf{B} = \begin{bmatrix} 4 \\ 5 \end{bmatrix} AX=B\mathbf{AX} = \mathbf{B}
Step 2: Find the inverse of A\mathbf{A}.
A−1=1det(A)[−3−1−25]\mathbf{A}^{-1} = \frac{1}{\text{det}(\mathbf{A})} \begin{bmatrix} -3 & -1 \\ -2 & 5 \end{bmatrix} det(A)=(5)(−3)−(2)(1)=−15−2=−17\text{det}(\mathbf{A}) = (5)(-3) – (2)(1) = -15 – 2 = -17 A−1=1−17[−3−1−25]=[317117217−517]\mathbf{A}^{-1} = \frac{1}{-17} \begin{bmatrix} -3 & -1 \\ -2 & 5 \end{bmatrix} = \begin{bmatrix} \frac{3}{17} & \frac{1}{17} \\ \frac{2}{17} & -\frac{5}{17} \end{bmatrix}
Step 3: Solve for X\mathbf{X}.
X=A−1B\mathbf{X} = \mathbf{A}^{-1} \mathbf{B} X=[317117217−517][45]\mathbf{X} = \begin{bmatrix} \frac{3}{17} & \frac{1}{17} \\ \frac{2}{17} & -\frac{5}{17} \end{bmatrix} \begin{bmatrix} 4 \\ 5 \end{bmatrix} X=[3(4)+1(5)172(4)−5(5)17]\mathbf{X} = \begin{bmatrix} \frac{3(4) + 1(5)}{17} \\ \frac{2(4) – 5(5)}{17} \end{bmatrix} X=[12+5178−2517]\mathbf{X} = \begin{bmatrix} \frac{12 + 5}{17} \\ \frac{8 – 25}{17} \end{bmatrix} X=[1717−1717]\mathbf{X} = \begin{bmatrix} \frac{17}{17} \\ \frac{-17}{17} \end{bmatrix} X=[1−1]\mathbf{X} = \begin{bmatrix} 1 \\ -1 \end{bmatrix}
Final Answer:
x=1, y=−1x = 1, \, y = -1
Explanation: Using the inverse matrix method allows for a systematic approach to solve linear systems. By finding the matrix inverse, the system is transformed into a simple matrix multiplication problem. This method is especially useful when solving systems programmatically or with larger datasets, as it avoids manual row operations.