• Matrix Addition / Subtraction

    Two matrices may be added or subtracted if they have the same dimensions. If a matrix such as A[m][n] is to be added to another matrix such as B[p][q], then the row dimensions m from A and p from B must be equal and the column dimensions n from A and q from B must also be equal. The Fig to the right shows how two corresponding elements of two matrices are added or subtracted.

    Use the following tool to add or subtract two matrices.

    Images and tables


    Add subtract Matrix

Matrix Addition/Subtraction Tool

The following program allows the user to add or subtract two matrices.

How to use the program:

Enter the dimensions of the two matrices. The dimensions of the two matrices must be the same, hence, only one matrix dimension is given. Choose the type of operation, i.e. Addition or Subtraction from the drop down. Click on Create Matrices Grids to create the grids for data entry. Enter elements for both matrices the press the Add or Subtract button to complete the operation. The resulting matrix will appear under the data matrices.


Matrices Dimensions

Matrix A:

 m =   n =  

Operation :