Wednesday 19 December 2018

Arithmetic operations between two matrices.

As we can do different arithmetic operations between numbers, same way we can also perform arithmetic operations between matrices also.

Here are some arithmetic operations :

Consider two matrices, A & B.



1. Addition :

syntax : A + B



2. Subtraction :

syntax : A - B



3. Multiplication :

syntax : A * B



NOTE :

1. For addition and subtraction of two matrices, order of two matrices should be same. i e, the number of rows and number of columns of both matrices should be same.

2. For multiplication of two matrices, the number of columns of first matrix should be equal to number of rows of second matrix.

No comments:

Post a Comment