Matrix Subtraction
Matrix subtraction is an operation where two matrices of the same dimensions are subtracted by subtracting their corresponding elements.
If we have two matrices \( A \) and \( B \) of size \( m \times n \), their difference \( C \) is obtained by subtracting the corresponding elements:
\[ C = A – B \]
Mathematically, if:
\[ A = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}, \quad B = \begin{bmatrix} b_{11} & b_{12} \\ b_{21} & b_{22} \end{bmatrix} \]
Then their difference is:
\[ C = A – B = \begin{bmatrix} a_{11} – b_{11} & a_{12} – b_{12} \\ a_{21} – b_{21} & a_{22} – b_{22} \end{bmatrix} \]
Pre-Conditions for Matrix Subtraction
Before subtracting two matrices, the following conditions must be met:
- The matrices must have the same dimensions. That is, if matrix \( A \) is of size \( m \times n \), then matrix \( B \) must also be of size \( m \times n \).
Examples of Matrix Subtraction
1. Subtracting Two 2×2 Matrices
Consider two 2×2 matrices:
\[ A = \begin{bmatrix} 8 & 5 \\ 7 & 6 \end{bmatrix}, \quad B = \begin{bmatrix} 3 & 2 \\ 4 & 1 \end{bmatrix} \]
Now, we need to find the difference of these two matrices.
\[ C = A – B \]
Subtracting these matrices element-wise:
\[ C = A – B = \begin{bmatrix} (8-3) & (5-2) \\ (7-4) & (6-1) \end{bmatrix} \]
\[ C = \begin{bmatrix} 5 & 3 \\ 3 & 5 \end{bmatrix} \]
2. Subtracting Two 3×3 Matrices
Given two 3×3 matrices:
\[ A = \begin{bmatrix} 9 & 6 & 3 \\ 7 & 5 & 2 \\ 4 & 8 & 1 \end{bmatrix}, \quad B = \begin{bmatrix} 3 & 2 & 1 \\ 6 & 3 & 0 \\ 2 & 4 & 1 \end{bmatrix} \]
Now, we need to find the difference of these two matrices.
\[ C = A – B \]
Performing element-wise subtraction:
\[ C = A – B = \begin{bmatrix} (9-3) & (6-2) & (3-1) \\ (7-6) & (5-3) & (2-0) \\ (4-2) & (8-4) & (1-1) \end{bmatrix} \]
\[ C = \begin{bmatrix} 6 & 4 & 2 \\ 1 & 2 & 2 \\ 2 & 4 & 0 \end{bmatrix} \]
3. Subtracting Two Row Matrices
Consider two row matrices:
\[ A = \begin{bmatrix} 10 & 15 & 20 \end{bmatrix}, \quad B = \begin{bmatrix} 5 & 7 & 9 \end{bmatrix} \]
Now, we need to find the difference of these two matrices.
\[ C = A – B \]
Performing element-wise subtraction:
\[ C = A – B = \begin{bmatrix} (10-5) & (15-7) & (20-9) \end{bmatrix} \]
\[ C = \begin{bmatrix} 5 & 8 & 11 \end{bmatrix} \]
4. Subtracting Two Column Matrices
Consider two column matrices:
\[ A = \begin{bmatrix} 6 \\ 9 \\ 12 \end{bmatrix}, \quad B = \begin{bmatrix} 2 \\ 3 \\ 4 \end{bmatrix} \]
Now, we need to find the difference of these two matrices.
\[ C = A – B \]
Performing element-wise subtraction:
\[ C = A – B = \begin{bmatrix} (6-2) \\ (9-3) \\ (12-4) \end{bmatrix} \]
\[ C = \begin{bmatrix} 4 \\ 6 \\ 8 \end{bmatrix} \]