Subtraction of matrices is the addition of the negative of a matrix to another matrix which means A - B = A + (-B). The subtraction of the matrix is subtracting the corresponding row-column element of one matrix with the same row-column element of another matrix.
Matrix subtraction is an operation where corresponding elements of two matrices are subtracted from each other to form a new matrix. This operation is similar to matrix addition, but instead of adding the corresponding elements, they are subtracted.

For two matrices to be subtracted, they must have the same dimensions, meaning they must have the same number of rows and columns. If A and B are two matrices of the same dimensions, their subtraction is denoted as A − B.
Table of Content
Notation of Matrix Subtraction
Given two matrices A and B of the same size, the matrix subtraction A−B is defined as:
(A − B)ij = Aij − Bij
Where Aij and Bij are the elements of matrices A and B at the ith row and jth column, respectively.
Condition for Matrix Subtraction
For matrix subtraction to be defined and valid, the following condition must be satisfied:
The two matrices must have the same dimensions, meaning they must have the same number of rows and the same number of columns.
Subtraction of n × n Matrices
The subtraction of n × n matrices includes subtracting each row column (i, j) element of one matrix with the corresponding row column (i, j) element of other matrix.
Consider matrix P =
P - Q =
\begin{bmatrix}p_{11}-q_{11} &p_{12}-q_{12}& ... & p_{1n}-q_{1n} \\p_{21}-q_{21} &p_{22}-q_{22}&... & p_{2n}-q_{2n} \\ \vdots & \vdots &\ddots &\vdots \\p_{n1}-q_{n1}&p_{n2}-q_{n2}&...&p_{nn}-q_{nn}\end{bmatrix}
Subtraction of 2 × 2 Matrices
The subtraction of 2 × 2 matrices includes subtracting each row column (i, j) element of one matrix with corresponding row column (i, j) element of the other matrix.
Consider matrix X =
X - Y =
\begin{bmatrix}x_{11}- y_{11}& x_{12} - y_{12}\\x_{21}-y_{21} & x_{22} - y_{22}\end{bmatrix}
Subtraction of 3 × 3 Matrices
The subtraction of 3 × 3 matrices includes subtracting each row column (i, j) element of one matrix with corresponding row column (i, j) element of other matrix.
Consider matrix X =
X - Y =
\begin{bmatrix}x_{11}- y_{11}& x_{12} - y_{12}& x_{13} - y_{13}\\x_{21}-y_{21} & x_{22} - y_{22}& x_{23} - y_{23}\\x_{31}-y_{31} & x_{32} - y_{32}&x_{33} - y_{33}\end{bmatrix}
Read More,
Solved Examples of Subtraction of Matrices
Example 1: Q1. Subtract the matrices: P =
Solution:
P - Q =
\begin{bmatrix}15 & 4\\13 & 9\end{bmatrix} -\begin{bmatrix}1 & -13\\6 & 0\end{bmatrix} P - Q =
\begin{bmatrix}15-1 & 4-(-13)\\13- 6 & 9-0\end{bmatrix} P - Q =
\begin{bmatrix}14 & 17\\7 & 9\end{bmatrix}
Example 2: Subtract the matrices A =
Solution:
A - B =
\begin{bmatrix} -8& 3& 9\\-1 & 2&6\\ 5& -12&4\end{bmatrix} -\begin{bmatrix} -3&5& 13\\-10 & 23&0\\ 7& -1&22\end{bmatrix} A - B =
\begin{bmatrix}-8-( -3)&3-5& 9-13\\-1-(-10) & 2-23&6-0\\ 5-7& -12-(-1)&4 -22\end{bmatrix} A - B =
\begin{bmatrix}-5& -2& -4\\9 & -21&6\\ -2& -11& -18\end{bmatrix}
Example 3: Compute R - S where R =
Solution:
R - S =
\begin{bmatrix} -2& 5& 1&10\\-3 & 7&-1&8\\ 6& -10&0&-4\end{bmatrix} -\begin{bmatrix} 8&4& -3&0\\-5 & -2&7&12\\ 0& 1&-2&9\end{bmatrix} R - S =
\begin{bmatrix} -2-8&5-4& 1-(-3)&10-0\\-3-(-5) & 7-(-2)&-1-7&8-12\\ 6-0& -10-1&0-(-2)&4-9\end{bmatrix} R - S =
\begin{bmatrix} -10& 1& 4&10\\2 & 9&-8&-4\\ 6& -11&2&-5\end{bmatrix}
Example 4: Subtract the matrices C =
Solution:
Order of C = 2 × 2 and Order of D = 3 × 3
Order of C ≠ Order of D
So, subtraction cannot be performed in the given matrices as the order of the given matrices are different and subtraction can only be performed on order of same matrices.
Practice Questions on Subtraction of Matrices
Question 1: Subtract the matrices: P =
Question 2: Subtract the matrices A =
Question 3: Compute R - S where R =
Question 4: Subtract the matrices C =
Answer key
Answer 1:
\begin{bmatrix}5 & 12\\-5 & -10\end{bmatrix}
Answer 2:\begin{bmatrix}-5 & -2 &-4\\9 & -21 & 6\\ -2&-11&-18\end{bmatrix}
Answer 3:\begin{bmatrix} -9& -3& 6&10\\0 & 4&14&0\\ 5& -17&0&14\end{bmatrix}
Answer 4: Since the matrices have different dimensions, matrix subtraction is not defined between them.