# Matrix Subtraction:

#### Subtraction of Matrices:

Two matrices A and B can be subtracted if both the matrices are of the same order $$(m \times n)$$, which means the number of rows and columns of both the matrices should be equal. The difference of the matrices will be the subtraction of the corresponding elements of both matrices A and B. The order of the final added matrix will always be the same $$(m \times n)$$ as the order of matrices A and B.

#### Negative of a Matrix:

The negative of a matrix is a matrix if all elements of that matrix are multiplied by (-1). It is denoted by (-A).

Example(1): If $$A = \begin{bmatrix} 2 & -4 \\ -6 & 8 \\ \end{bmatrix}$$, then find (-A)?

Solution: $$-A = (-1) \ \begin{bmatrix} 2 & -4 \\ -6 & 8 \\ \end{bmatrix}$$ $$-A = \ \begin{bmatrix} -2 & 4 \\ 6 & -8 \\ \end{bmatrix}$$

Example(2): Find the difference of two matrices $$A = \begin{bmatrix} 4 & 5 \\ 6 & 7 \\ \end{bmatrix}$$, and $$B = \begin{bmatrix} 1 & 2 \\ 3 & 4 \\ \end{bmatrix}$$?

Solution: Here both the matrices A and B are of $$2 \times 2$$ order hence the subtraction of these matrices is possible. $$A - B = \begin{bmatrix} 4 - 1 & 5 - 2 \\ 6 - 3 & 7 - 4 \\ \end{bmatrix}$$ $$A - B = \begin{bmatrix} 3 & 3 \\ 3 & 3 \\ \end{bmatrix}$$ The order of final matrix (A - B) is also same $$(2 \times 2)$$.

Example(3): If $$A = \begin{bmatrix} 3 & 4 \\ 5 & 6 \\ \end{bmatrix}$$, and $$B = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ \end{bmatrix}$$ then find the (A - B)?

Solution: Here the order of matrix A is $$2 \times 2$$, and the order of matrix B is $$2 \times 3$$. Hence these matrices cannot be subtracted. The order of both the matrices must be the same.

Example(4): If $$A = \begin{bmatrix} 5 & 6 & 7 \\ 8 & 9 & 10 \\ 12 & 15 & 18 \\ \end{bmatrix}$$, and $$B = \begin{bmatrix} 1 & 0 & 2 \\ 3 & 2 & 0 \\ 4 & 0 & 1 \\ \end{bmatrix}$$ then find the (A - B)?

Solution: Here the order of both the matrices is the same $$3 \times 3$$ hence the subtraction of these matrices is possible. $$A - B = \begin{bmatrix} 5 - 1 & 6 - 0 & 7 - 2 \\ 8 - 3 & 9 - 2 & 10 - 0 \\ 12 - 4 & 15 - 0 & 18 - 1 \\ \end{bmatrix}$$ $$A - B = \begin{bmatrix} 4 & 6 & 5 \\ 5 & 7 & 10 \\ 8 & 15 & 17 \\ \end{bmatrix}$$

Example(5): If $$A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ \end{bmatrix}$$, and $$B = \begin{bmatrix} -2 & 0 & 2 \\ -1 & 1 & -3 \\ \end{bmatrix}$$ then find the (2A - B)?

Solution: Here the order of both the matrices is the same $$2 \times 3$$ hence the subtraction of these matrices is possible. Hence $$2A - B$$ $$= 2 \ \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ \end{bmatrix} - \begin{bmatrix} -2 & 0 & 2 \\ -1 & 1 & -3 \\ \end{bmatrix}$$ $$= \begin{bmatrix} 2 & 4 & 6 \\ 8 & 10 & 12 \\ \end{bmatrix} - \begin{bmatrix} -2 & 0 & 2 \\ -1 & 1 & -3 \\ \end{bmatrix}$$ $$= \begin{bmatrix} 2 - (-2) & 4 - 0 & 6 - 2 \\ 8 - (-1) & 10 - 1 & 12 - (-3) \\ \end{bmatrix}$$ $$2A- B = \begin{bmatrix} 4 & 4 & 4 \\ 9 & 9 & 15 \\ \end{bmatrix}$$