Addition of Matrices¶
Definition¶
The addition of matrices is the operation of adding two matrices by adding their corresponding elements. This operation is defined only for matrices of the same dimensions (i.e., they must have the same number of rows and columns). The resulting matrix will have the same dimensions as the original matrices.
If \( A \) and \( B \) are two matrices of the same dimensions, the sum \( A + B \) is obtained by adding each element from matrix \( A \) with the corresponding element from matrix \( B \).
Mathematically:¶
Given two matrices \( A = [a_{ij}] \) and \( B = [b_{ij}] \) of dimensions \( m \times n \), the sum of the two matrices is:
Where: - \( A \) and \( B \) are both \( m \times n \) matrices. - \( a_{ij} \) and \( b_{ij} \) represent the elements of matrices \( A \) and \( B \), respectively, at row \( i \) and column \( j \). - The resulting matrix will have the same dimensions \( m \times n \).
Example 1:¶
Let \( A \) and \( B \) be two 2x2 matrices: [ A = \begin{bmatrix} 1 & 2 \ 3 & 4 \end{bmatrix}, \quad B = \begin{bmatrix} 5 & 6 \ 7 & 8 \end{bmatrix} ]
The sum of \( A \) and \( B \) is calculated as: [ A + B = \begin{bmatrix} 1+5 & 2+6 \ 3+7 & 4+8 \end{bmatrix} = \begin{bmatrix} 6 & 8 \ 10 & 12 \end{bmatrix} ]
Example 2:¶
Let \( C \) and \( D \) be two 3x3 matrices: [ C = \begin{bmatrix} 2 & -1 & 4 \ 0 & 5 & 3 \ 7 & 8 & -2 \end{bmatrix}, \quad D = \begin{bmatrix} 3 & 1 & -4 \ -2 & 0 & 5 \ 6 & -3 & 1 \end{bmatrix} ]
The sum of \( C \) and \( D \) is calculated as: [ C + D = \begin{bmatrix} 2+3 & -1+1 & 4+(-4) \ 0+(-2) & 5+0 & 3+5 \ 7+6 & 8+(-3) & -2+1 \end{bmatrix} = \begin{bmatrix} 5 & 0 & 0 \ -2 & 5 & 8 \ 13 & 5 & -1 \end{bmatrix} ]
Conclusion¶
- Addition of matrices is performed element by element.
- The operation is only valid if the two matrices have the same dimensions.
- The resulting matrix will also have the same dimensions as the original matrices.
How can I help you today?