Matrix Operations
**Problem 1:** Given matrices
$$A=\begin{bmatrix}3 & 2 \\ -1 & 5\end{bmatrix}, \quad B=\begin{bmatrix}2 & -4 \\ 3 & 1\end{bmatrix}$$
1. Find $A+B$
2. Find determinant of $A-B$
3. Find $AB$
4. Find inverse $B^{-1}$
**Problem 2:** Show that
$$\begin{vmatrix}1 & a & b+c \\\ 1 & b & c+a \\\ 1 & c & a+b \end{vmatrix} = 0$$
**Problem 3:** Solve linear system using matrix inversion
$$\begin{cases} x - y + z = 8 \\\ \text{(need full system to solve; assuming)} \\ y + 2z = 7 \\\ 3x - z = 5 \end{cases}$$
---
### Solution:
**1.a Find $A+B$**
Step 1: Add corresponding elements:
$$A+B=\begin{bmatrix}3+2 & 2+(-4) \\ -1+3 & 5+1 \end{bmatrix}=\begin{bmatrix}5 & -2 \\ 2 & 6 \end{bmatrix}$$
**1.b Find determinant of $A-B$**
Step 1: Compute $A-B$:
$$A-B=\begin{bmatrix}3-2 & 2-(-4) \\ -1-3 & 5-1 \end{bmatrix}=\begin{bmatrix}1 & 6 \\ -4 & 4 \end{bmatrix}$$
Step 2: Compute determinant:
$$\det(A-B)=1 \times 4 - (-4) \times 6 = 4 + 24 = 28$$
**1.c Find $AB$**
Step 1: Multiply matrices:
$$AB = \begin{bmatrix}3 & 2 \\ -1 & 5\end{bmatrix} \begin{bmatrix}2 & -4 \\ 3 & 1\end{bmatrix}$$
Step 2: Calculate each element:
- First row, first column: $3 \times 2 + 2 \times 3 = 6 + 6 = 12$
- First row, second column: $3 \times (-4) + 2 \times 1 = -12 + 2 = -10$
- Second row, first column: $-1 \times 2 + 5 \times 3 = -2 + 15 = 13$
- Second row, second column: $-1 \times (-4) + 5 \times 1 = 4 + 5 = 9$
So,
$$AB = \begin{bmatrix}12 & -10 \\ 13 & 9 \end{bmatrix}$$
**1.d Find $B^{-1}$**
Step 1: Compute determinant of $B$:
$$\det(B) = 2 \times 1 - (-4) \times 3 = 2 + 12 = 14$$
Step 2: Find adjoint matrix:
$$\text{adj}(B) = \begin{bmatrix}1 & 4 \\ -3 & 2 \end{bmatrix}$$
(Recall adjoint switches diagonal elements and changes signs of off-diagonal.)
Step 3: Calculate inverse:
$$B^{-1} = \frac{1}{14} \begin{bmatrix}1 & 4 \\ -3 & 2 \end{bmatrix} = \begin{bmatrix} \frac{1}{14} & \frac{2}{7} \\ -\frac{3}{14} & \frac{1}{7} \end{bmatrix}$$
**2. Show determinant is zero:**
Given matrix
$$M=\begin{bmatrix}1 & a & b+c \\\ 1 & b & c+a \\\ 1 & c & a+b \end{bmatrix}$$
Step 1: Subtract first row from second and third rows:
$$\begin{vmatrix}1 & a & b+c \\\ 0 & b - a & (c + a) - (b + c) \\\ 0 & c - a & (a + b) - (b + c) \end{vmatrix} = \begin{vmatrix}1 & a & b+c \\\ 0 & b - a & a - b \\\ 0 & c - a & a - c \end{vmatrix}$$
Step 2: Cofactor expansion along first column:
$$=1 \times \begin{vmatrix} b - a & a - b \\\ c - a & a - c \end{vmatrix}$$
Step 3: Compute 2x2 determinant:
$$ (b - a)(a - c) - (a - b)(c - a)$$
Note: $(a - b) = -(b - a)$ and $(a-c)=-(c-a)$
Rewrite second term:
$$(a - b)(c - a) = -(b - a)(c - a)$$
So total:
$$(b - a)(a - c) - [-(b - a)(c - a)] = (b - a)(a - c + c - a) = (b - a) \times 0 = 0$$
Hence
$$\det(M) = 0$$
**3. Solve system using matrix inversion:**
Given system (assuming full system for solution):
$$\begin{cases} x - y + z = 8 \\ 0x + y + 2z = 7 \\ 3x + 0y - z =5 \end{cases}$$
Step 1: Write coefficient matrix and constant vector
$$A = \begin{bmatrix}1 & -1 & 1 \\ 0 & 1 & 2 \\ 3 & 0 & -1 \end{bmatrix}, \quad \mathbf{b} = \begin{bmatrix}8 \\ 7 \\ 5 \end{bmatrix}$$
Step 2: Find $A^{-1}$
Calculate determinant of $A$:
$$\det(A) = 1 \times \begin{vmatrix}1 & 2 \\ 0 & -1\end{vmatrix} - (-1) \times \begin{vmatrix}0 & 2 \\ 3 & -1\end{vmatrix} + 1 \times \begin{vmatrix}0 & 1 \\ 3 & 0\end{vmatrix}$$
$$= 1(1\times -1 - 0\times 2) +1(0\times -1 - 3\times 2) +1(0\times 0 - 3\times 1)$$
$$= -1 + 1(0 - 6) + 1(0 -3) = -1 -6 -3 = -10$$
Step 3: Find matrix of cofactors, then adjoint (transpose cofactors), then inverse:
Cofactors:
$$C = \begin{bmatrix}(-1)^{1+1} \times (-1) & (-1)^{1+2} \times (0 - 6) & (-1)^{1+3} \times 0\\ (-1)^{2+1} \times (-3) & (-1)^{2+2} \times (-4) & (-1)^{2+3} \times 3 \\ (-1)^{3+1} \times 2 & (-1)^{3+2} \times 3 & (-1)^{3+3} \times 1\end{bmatrix}$$
Calculate each minor determinant:
- $C_{11} = \begin{vmatrix}1 & 2 \\ 0 & -1 \end{vmatrix} = -1$
- $C_{12} = -\begin{vmatrix}0 & 2 \\ 3 & -1 \end{vmatrix} = - (0\times -1 - 3\times 2) = - (0 - 6) = 6$
- $C_{13} = \begin{vmatrix}0 & 1 \\ 3 & 0 \end{vmatrix} = 0 - 3 = -3$
- $C_{21} = -\begin{vmatrix}-1 & 1 \\ 0 & -1 \end{vmatrix} = -((-1)(-1) - 0\times 1) = - (1 - 0) = -1$
- $C_{22} = \begin{vmatrix}1 & 1 \\ 3 & -1 \end{vmatrix} = 1\times (-1) - 3\times 1 = -1 -3 = -4$
- $C_{23} = -\begin{vmatrix}1 & -1 \\ 3 & 0 \end{vmatrix} = - (1\times 0 - 3\times -1) = - (0 + 3) = -3$
- $C_{31} = \begin{vmatrix}-1 & 1 \\ 1 & 2 \end{vmatrix} = (-1)(2) - (1)(1) = -2 - 1 = -3$
- $C_{32} = -\begin{vmatrix}1 & 1 \\ 0 & 2 \end{vmatrix} = - (1\times 2 - 0\times 1) = - (2 - 0)= -2$
- $C_{33} = \begin{vmatrix}1 & -1 \\ 0 & 1 \end{vmatrix} = 1\times 1 - 0\times (-1) = 1 - 0 = 1$
So
$$C=\begin{bmatrix}-1 & 6 & -3 \\ -1 & -4 & -3 \\ -3 & -2 & 1 \end{bmatrix}$$
Step 4: Adjoint is transpose:
$$\text{adj}(A) = C^T=\begin{bmatrix} -1 & -1 & -3 \\ 6 & -4 & -2 \\ -3 & -3 & 1 \end{bmatrix}$$
Step 5: Calculate inverse:
$$A^{-1} = \frac{1}{\det(A)} \text{adj}(A) = -\frac{1}{10} \begin{bmatrix} -1 & -1 & -3 \\ 6 & -4 & -2 \\ -3 & -3 & 1 \end{bmatrix} = \begin{bmatrix} \frac{1}{10} & \frac{1}{10} & \frac{3}{10} \\ -\frac{3}{5} & \frac{2}{5} & \frac{1}{5} \\ \frac{3}{10} & \frac{3}{10} & -\frac{1}{10} \end{bmatrix}$$
Step 6: Compute solution vector:
$$\mathbf{x} = A^{-1} \mathbf{b} = \begin{bmatrix} \frac{1}{10} & \frac{1}{10} & \frac{3}{10} \\ -\frac{3}{5} & \frac{2}{5} & \frac{1}{5} \\ \frac{3}{10} & \frac{3}{10} & -\frac{1}{10} \end{bmatrix} \begin{bmatrix} 8 \\ 7 \\ 5 \end{bmatrix}$$
Calculate each component:
- $x = \frac{1}{10} \times 8 + \frac{1}{10} \times 7 + \frac{3}{10} \times 5 = 0.8 + 0.7 +1.5 = 3.0$
- $y = -\frac{3}{5} \times 8 + \frac{2}{5} \times 7 + \frac{1}{5} \times 5 = -4.8 + 2.8 + 1 = -1$
- $z = \frac{3}{10} \times 8 + \frac{3}{10} \times 7 - \frac{1}{10} \times 5 = 2.4 + 2.1 - 0.5 = 4.0$
**Final solutions:**
$$x=3, \quad y=-1, \quad z=4$$