Matrix Addition
Matrix addition is an operation where two matrices of the same dimensions are added together by summing their corresponding elements.
If we have two matrices \( A \) and \( B \) of size \( m \times n \), their sum \( C \) is obtained by adding 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 sum 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 Addition
Before adding 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 Addition
1. Adding Two 2×2 Matrices
Consider two 2×2 matrices:
\[ A = \begin{bmatrix} 1 & 3 \\ 5 & 7 \end{bmatrix}, \quad B = \begin{bmatrix} 4 & 2 \\ 6 & 8 \end{bmatrix} \]
Now, we need to find the sum of these two matrices.
\[ C = A + B \]
Adding these matrices element-wise:
\[ C = A + B = \begin{bmatrix} (1+4) & (3+2) \\ (5+6) & (7+8) \end{bmatrix} \]
\[ C = \begin{bmatrix} 5 & 5 \\ 11 & 15 \end{bmatrix} \]
2. Adding Two 3×3 Matrices
Given two 3×3 matrices:
\[ A = \begin{bmatrix} 2 & 4 & 6 \\ 1 & 3 & 5 \\ 7 & 8 & 9 \end{bmatrix}, \quad B = \begin{bmatrix} 9 & 7 & 5 \\ 6 & 4 & 2 \\ 3 & 1 & 0 \end{bmatrix} \]
Now, we need to find the sum of these two matrices.
\[ C = A + B \]
Performing element-wise addition:
\[ C = A + B = \begin{bmatrix} (2+9) & (4+7) & (6+5) \\ (1+6) & (3+4) & (5+2) \\ (7+3) & (8+1) & (9+0) \end{bmatrix} \]
\[ C = \begin{bmatrix} 11 & 11 & 11 \\ 7 & 7 & 7 \\ 10 & 9 & 9 \end{bmatrix} \]
3. Adding Two Row Matrices
Consider two row matrices:
\[ A = \begin{bmatrix} 5 & 10 & 15 \end{bmatrix}, \quad B = \begin{bmatrix} 2 & 4 & 6 \end{bmatrix} \]
Now, we need to find the sum of these two matrices.
\[ C = A + B \]
Performing element-wise addition:
\[ C = A + B = \begin{bmatrix} (5+2) & (10+4) & (15+6) \end{bmatrix} \]
\[ C = \begin{bmatrix} 7 & 14 & 21 \end{bmatrix} \]
4. Adding Two Column Matrices
Consider two column matrices:
\[ A = \begin{bmatrix} 3 \\ 6 \\ 9 \end{bmatrix}, \quad B = \begin{bmatrix} 1 \\ 2 \\ 3 \end{bmatrix} \]
Now, we need to find the sum of these two matrices.
\[ C = A + B \]
Performing element-wise addition:
\[ C = A + B = \begin{bmatrix} (3+1) \\ (6+2) \\ (9+3) \end{bmatrix} \]
\[ C = \begin{bmatrix} 4 \\ 8 \\ 12 \end{bmatrix} \]