There is only one rule for matrix subtraction.
The matrices should have same dimensions (number of rows and columns).
Having a different dimension will not allow you to subtract the matrices.
For example, if there are two matrices A and B
A = [89 45 21] and B = [23 33 34]
The matrices A and B have same dimensions (1x3), so subtraction is possible. The resultant matrix will be
A - B = [89-23 45-33 21-34] = [66 12 -13]