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 a_{1 1}) is added to the corresponding element of the second matrix(ie b_{1 1}), and the result is placed in the corresponding space in the third, or answer matrix(ie c_{1 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:

/ a_{1 1}+b_{1 1} a_{1 2}+b_{1 2} a_{1 3}+b_{1 3} . . . a_{1 m}+b_{1 m} \
A+B=| a_{2 1}+b_{2 1} a_{2 2}+b_{2 2} . . . a_{2 m}+b_{2 m} |
| a_{3 1}+b_{3 1} . . . . |
| . . . |
| . . . |
| . . |
\ a_{n 1}+b_{n 1} . . . a_{n n}+b_{n m} /