Two matrices may be added or subtracted only if they have the same dimension; that is, they must have the same number of rows and columns.
Addition or subtraction is accomplished by adding or subtracting corresponding elements. For example, consider matrix A and matrix B.