Matrix Addition and Subtraction Calculator
Calculate the sum or difference of two matrices entry by entry with complete step-by-step arithmetic and exact fraction support.
How Matrix Addition and Subtraction Work
Matrix addition and subtraction are element-wise operations. Unlike matrix multiplication which involves dot products of rows and columns, addition and subtraction simply operate on pairs of numbers located in the corresponding positions.
\((A + B)_{ij} = A_{ij} + B_{ij}\)
\((A - B)_{ij} = A_{ij} - B_{ij}\)
Requirement: Matrix \(A\) and Matrix \(B\) must have identical dimensions \(m \times n\).Key Algebraic Properties
- Commutativity of Addition: \(A + B = B + A\). Changing the order of addends yields the same sum.
- Non-Commutativity of Subtraction: \(A - B \neq B - A\). In general, \(A - B = -(B - A)\).
- Associativity: \((A + B) + C = A + (B + C)\).
- Additive Identity: Adding a zero matrix \(O\) leaves the matrix unchanged: \(A + O = A\).
- Additive Inverse: \(A + (-A) = O\), where \(-A\) is obtained by multiplying every entry by \(-1\).
Solved Examples with Complete Working
Compute the sum of matrices \(A\) and \(B\):
\(A = \begin{bmatrix} 2 & -5 \\ 4 & 1 \end{bmatrix}, \quad B = \begin{bmatrix} -3 & 7 \\ 0 & -6 \end{bmatrix}\)
Step-by-step element addition:
- Row 1, Col 1: \(2 + (-3) = -1\)
- Row 1, Col 2: \(-5 + 7 = 2\)
- Row 2, Col 1: \(4 + 0 = 4\)
- Row 2, Col 2: \(1 + (-6) = -5\)
\(A + B = \begin{bmatrix} -1 & 2 \\ 4 & -5 \end{bmatrix}\)
Compute the difference \(C - D\):
\(C = \begin{bmatrix} \frac{1}{2} & 3 \\ 1 & -\frac{2}{3} \end{bmatrix}, \quad D = \begin{bmatrix} \frac{1}{4} & -1 \\ \frac{3}{2} & \frac{1}{3} \end{bmatrix}\)
Step-by-step subtraction:
- Row 1, Col 1: \(\frac{1}{2} - \frac{1}{4} = \frac{2}{4} - \frac{1}{4} = \frac{1}{4}\)
- Row 1, Col 2: \(3 - (-1) = 3 + 1 = 4\)
- Row 2, Col 1: \(1 - \frac{3}{2} = \frac{2}{2} - \frac{3}{2} = -\frac{1}{2}\)
- Row 2, Col 2: \(-\frac{2}{3} - \frac{1}{3} = -\frac{3}{3} = -1\)
\(C - D = \begin{bmatrix} \frac{1}{4} & 4 \\ -\frac{1}{2} & -1 \end{bmatrix}\)
Matrix Foundations
Mastering element-wise addition and scalar operations is the first step toward understanding matrix determinants and transformations.
Read our beginner guide: What is a Determinant and Why Does it Matter? →