Matrix Operations 84E5A6
1. Problem: Compute the matrix operations for given matrices A, B, and C.
Matrices:
$$A=\begin{bmatrix}1 & 3 \\ -2 & 3\end{bmatrix}, B=\begin{bmatrix}2 & -1 \\ 1 & 4\end{bmatrix}, C=\begin{bmatrix}1 & 2 \\ 2 & 4\end{bmatrix}$$
Recall matrix addition and subtraction are done element-wise.
**a.** Compute $A + B$:
$$A+B=\begin{bmatrix}1+2 & 3+(-1) \\ -2+1 & 3+4\end{bmatrix}=\begin{bmatrix}3 & 2 \\ -1 & 7\end{bmatrix}$$
**b.** Compute $A + C$:
$$A+C=\begin{bmatrix}1+1 & 3+2 \\ -2+2 & 3+4\end{bmatrix}=\begin{bmatrix}2 & 5 \\ 0 & 7\end{bmatrix}$$
**c.** Compute $A - B$:
$$A-B=\begin{bmatrix}1-2 & 3-(-1) \\ -2-1 & 3-4\end{bmatrix}=\begin{bmatrix}-1 & 4 \\ -3 & -1\end{bmatrix}$$
**d.** Compute $A - C$:
$$A-C=\begin{bmatrix}1-1 & 3-2 \\ -2-2 & 3-4\end{bmatrix}=\begin{bmatrix}0 & 1 \\ -4 & -1\end{bmatrix}$$
2. Problem: Compute matrix operations for 3x3 matrices A and B.
Matrices:
$$A=\begin{bmatrix}1 & 2 & 3 \\ -2 & 0 & 1 \\ 4 & 5 & 6\end{bmatrix}, B=\begin{bmatrix}3 & 1 & 4 \\ 4 & 0 & -1 \\ 5 & 2 & -2\end{bmatrix}$$
Zero matrix $0$ is the $3\times3$ matrix with all zeros.
**a.** Compute $A + B$:
$$A+B=\begin{bmatrix}1+3 & 2+1 & 3+4 \\ -2+4 & 0+0 & 1+(-1) \\ 4+5 & 5+2 & 6+(-2)\end{bmatrix}=\begin{bmatrix}4 & 3 & 7 \\ 2 & 0 & 0 \\ 9 & 7 & 4\end{bmatrix}$$
**b.** Compute $A - B$:
$$A-B=\begin{bmatrix}1-3 & 2-1 & 3-4 \\ -2-4 & 0-0 & 1-(-1) \\ 4-5 & 5-2 & 6-(-2)\end{bmatrix}=\begin{bmatrix}-2 & 1 & -1 \\ -6 & 0 & 2 \\ -1 & 3 & 8\end{bmatrix}$$
**c.** Compute $B - A$:
$$B-A=\begin{bmatrix}3-1 & 1-2 & 4-3 \\ 4-(-2) & 0-0 & -1-1 \\ 5-4 & 2-5 & -2-6\end{bmatrix}=\begin{bmatrix}2 & -1 & 1 \\ 6 & 0 & -2 \\ 1 & -3 & -8\end{bmatrix}$$
**d.** Compute $A + 0$ (adding zero matrix leaves $A$ unchanged):
$$A+0=A=\begin{bmatrix}1 & 2 & 3 \\ -2 & 0 & 1 \\ 4 & 5 & 6\end{bmatrix}$$
**e.** Compute $0 + B$ (adding zero matrix leaves $B$ unchanged):
$$0+B=B=\begin{bmatrix}3 & 1 & 4 \\ 4 & 0 & -1 \\ 5 & 2 & -2\end{bmatrix}$$
Final answers are the matrices computed above.