- Random Topics
- Random Topics
- Matrix Multiplication
- Leap Year Formula Explained
- Matrix Addition
- Matrix Subtraction
- Celsius to Fahrenheit
- Find LCM
- Find HCF
- Pascal's Triangle
- Area Perimeter of Triangle
- Programming Examples
- Python Program Examples
- Java Programming Examples
- C++ Programming Examples
- C Programming Examples
- Give Online Test
- All Test List
- Java Test
- C Test
- C++ Test
- HTML Test
- CSS Test
- JavaScript Test
- SQL Test
- Computer Fundamental Test
- Operating System Test
- Networking Test
- MySQL Test

# How to Subtract Two Matrices ?

In this article, you will get aware about how to subtract one matrix from another. Let's suppose that there are two given matrix, matrix A and Matrix B. The value of Matrix A is:

5 6 7 8

And the value of Matrix B is:

1 2 3 4

Then its subtraction goes like:

So we have another matrix, matrix C. The value of matrix C is:

4 4 4 4

This is the subtraction of two given matrix A and B.

## Condition for Matrix Subtraction

In order to define the subtraction of two matrices, dimension must be same. That is, if there are 3 rows and 4
columns available in a matrix say **A**, then to subtract it with another matrix say **B**. Matrix B must have
3 rows and 4 columns in order to define its subtraction with matrix A.

### Further Explanation on Matrix Subtraction

As already told, for the matrix subtraction, there should be an equal number of rows and columns. A null matrix is produced when a matrix is subtracted from itself, or when A - A = O.

Matrix subtraction is the addition of a matrix's negative to another matrix, i.e., A - B = A + (-B). The relevant elements are also subtracted in order to subtract matrices.

Given A and B matrices as follows and find A-B. The Matrix A =

And the Matrix B =

Simply subtracting the matching elements from matrices A and B will provide the answer, in this way.

So the value of **Matrix A - Matrix B** will be:

#### Programs Made on This

- Matrix Subtraction in C
- Matrix Subtraction in C++
- Matrix Subtraction in Java
- Matrix Subtraction in Python

« Previous Tutorial Next Tutorial »

Like/Share Us on Facebook 😋