In order for two matrices to be added together, the dimensions of both matrices must be equal, ie a 4x3 matrix can only be added to another 4x3 matrix.

```    / 3   5   6 \              / 2   4    2 \
A= | 5    4   13 |        B = | 3    4    8  |
| 7    6   2  |            | 12   3    5  |
\ 13  4   6 /              \ 4   6    4 /
```

Given the previous matrices A and B, in order that the two be added together, the dimensions must be the same. Both are 4x3 matrices, and thus can be added to each other. The addition of A and B to each other will result in another 4x3 matrix. To determine the elements of this new 4x3 matrix, each element of one matrix (ie a1 1) is added to the corresponding element of the second matrix(ie b1 1), and the result is placed in the corresponding space in the third, or answer matrix(ie c1 1).

```
/ 3+2    5+4    6+2 \     / 5  9   8  \
A+B=| 5+3     4+4    13+8 | = | 8   8   21  |
| 7+12    6+3    2+5  |   | 19  9   7   |
\ 13+4   4+6    6+4 /     \17  10  10 /

/ 2+3    4+5    2+6 \     / 5  9   8  \
B+A=| 3+5     4+4    8+13 | = | 8   8   21  |
| 12+7    3+6    5+2  |   | 19  9   7   |
\ 4+13   6+4    4+6 /     \17  10  10 /

```

Note that A+B is the same matrix as B+A. Thus, the addition of matrices is commutative. Matrix addition is also associative, and thus (A+B)+D is the same sum as A+(B+D).

In summary, any matrix of dimension nxm can only be added to another matrix of dimension nxm. The resulting matrix is an nxm matrix of the following elements:

```
/ a1 1+b1 1   a1 2+b1 2   a1 3+b1 3  . . .  a1 m+b1 m  \
A+B=| a2 1+b2 1    a2 2+b2 2  . . .             a2 m+b2 m |
| a3 1+b3 1     . . .                        .   |
|    .         .                          .   |
|    .         .                          .   |
|    .                                    .   |
\ an 1+bn 1  . . .                      an n+bn m / ```