Addition and substraction of matrices
How do we add or substract matrices?
We just need to add or substract each of their components
For example,
![\begin{gathered} \begin{bmatrix}{-12} & {1} & {2} \\ {-7} & {1} & {13} \\ {0} & {-10} & {0}\end{bmatrix}+\begin{bmatrix}{4} & {-8} & {9} \\ {-5} & {3} & {5} \\ {-6} & {11} & {2}\end{bmatrix} \\ =\begin{bmatrix}{-12+4} & {1-8} & {2+9} \\ {-7-5} & {1+3} & {13+5} \\ {0-6} & {-10+11} & {0+2}\end{bmatrix} \\ =\begin{bmatrix}{-8} & {-7} & {11} \\ {-12} & {4} & {18} \\ {-6} & {1} & {2}\end{bmatrix} \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/uw2m5kfxm7hf8l664g1apexvgtociz25gj.png)
![\begin{gathered} \begin{bmatrix}{-12} & {1} & {2} \\ {-7} & {1} & {13} \\ {0} & {-10} & {0}\end{bmatrix}-\begin{bmatrix}{4} & {-8} & {9} \\ {-5} & {3} & {5} \\ {-6} & {11} & {2}\end{bmatrix} \\ =\begin{bmatrix}{-12-4} & {1-(-8)} & {2-9} \\ {-7-(-5)} & {1-3} & {13-5} \\ {0-(-6)} & {-10-11} & {0-2}\end{bmatrix} \\ =\begin{bmatrix}{-16} & {9} & {-7} \\ {-2} & {-2} & {8} \\ {6} & {-21} & {-2}\end{bmatrix} \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/ann37nbnfo9fm25mzm6fgia3t1gi9ylowx.png)
In order to add and substract two matrices they both have to have the same amount of terms (same number of columns and rows)