Matrix SubtractionCalculator

Matrix size: x





Answer




How to use this Matrix Subtraction Calculator 🤔

Follow these steps to perform Matrix Subtraction for the given matrices.

  1. Enter the matrix size for matrix A, and matrix B.
  2. Based on the given matrix size, a matrix of input fields appears. Enter the matrix elements.
  3. As and when you complete entering the matrix elements, Matrix Subtraction is calculated, and displayed in the answer section.

Matrix Subtraction

Matrix subtraction is the process of subtracting one matrix from another by subtracting their corresponding elements. This operation is only possible when the matrices have the same dimensions.

Given two matrices A and B, their difference C = A - B is computed as:


C[i][j] = A[i][j] - B[i][j]

where 1 ≤ i ≤ m and 1 ≤ j ≤ n, and m and n are the number of rows and columns of the matrices, respectively.

Example 1

Let's subtract the following two matrices:

\( A = \begin{bmatrix} 5 & 7 & 9 \\ 11 & 13 & 15 \\ 8 & 10 & 12 \end{bmatrix} \)

\( B = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} \)

The difference of A and B is:

\( C = A - B = \begin{bmatrix} 5-1 & 7-2 & 9-3 \\ 11-4 & 13-5 & 15-6 \\ 8-7 & 10-8 & 12-9 \end{bmatrix} = \begin{bmatrix} 4 & 5 & 6 \\ 7 & 8 & 9 \\ 1 & 2 & 3 \end{bmatrix} \)

Example 2

Consider another example with different matrices:

\( A = \begin{bmatrix} 3 & 7 \\ 11 & 15 \end{bmatrix} \)

\( B = \begin{bmatrix} 2 & 4 \\ 6 & 8 \end{bmatrix} \)

The difference of A and B is:

\( C = A - B = \begin{bmatrix} 3-2 & 7-4 \\ 11-6 & 15-8 \end{bmatrix} = \begin{bmatrix} 1 & 3 \\ 5 & 7 \end{bmatrix} \)

These examples demonstrate the basic process of matrix subtraction by subtracting corresponding elements of the input matrices to get the resultant matrix.