Subtraction, by definition, is simply the addition of the opposite of the number. (ie. a-b=a+(-1)(b)=a+(-b))

The same is applicable to matrices. See matric multiplication by a scalar for the multiplication of a matrix by a number.

/ 3 10 2 \ / 2 8 1 \
A=| 2 9 4 | B=| 10 6 8 |
| 13 4 2 | | 4 14 10 |
\ 3 6 7 / \ 6 7 4 /

As in the addition of matrices, in order to subtract matrices, the dimensions of both matrices must be the same. Matrix A is a 4x3 matrix and Matrix B is a 4x3 matrix, thus they can be subtracted from each other.

To compute the differce A-B, you will add the opposite of B to A, or A-B=A+(-1)(B).

/ 2 8 1 \ / -2 -8 -1 \
-1B=-B= -1| 10 6 8 | = | -10 -6 -8 |
| 4 14 10 | | -4 -14 -10 |
\ 6 7 4 / \ -6 -7 -4 /

/ 3 10 2 \ / -2 -8 -1 \ / 1 2 1 \
A+-B=| 2 9 4 | + | -10 -6 -8 | = | -8 3 -4 |
| 13 4 2 | | -4 -14 -10 | | 9 10 -8 |
\ 3 6 7 / \ -6 -7 -4 / \ -3 -1 3 /

Note that in the subtraction of matrices, just as in subtraction of anything else, the order does matter. A-B is NOT the same a B-A.