How to add and subtract matrices and solve matrix equations

Adding or subtracting matrices means combining entries in matching positions. The matrices need the same dimensions so every entry has a partner. We can use those same operations to solve an equation for an unknown matrix.

Match the dimensions and positions

A=[1234]
B=[5678]

Both matrices are 2×2. Add each entry of A to the entry in the same row and column of B.

A+B=[681012]

Subtraction uses the same positions, in the stated order.

A-B=[-4-4-4-4]

Isolate an unknown matrix

If X+A=A+B, subtract A from both sides to get X=B. Entry by entry, the matrix with rows (6,8) and (10,12) minus A gives rows (5,6) and (7,8).

Solve a matrix equation with several terms

Let the equation be P+Q=X+C-D, using these four known matrices.

P=[5-7-10]
Q=[3-4-1-6]
C=[10170]
D=[2411-9]

The sum P+Q has rows (8,-11) and (-2,-6). The difference C-D has rows (-1,-4) and (6,9). Subtract that difference from both sides to isolate X.

X=[9-7-8-15]

Use the addition properties

Matrix addition is commutative and associative: A+B=B+A and (A+B)+C=A+(B+C) when the dimensions match. Subtraction generally changes when its order or grouping changes, so we keep the signs and parentheses from the original expression.