Operations on Matrices

The  addition of matrices, multiplication of a matrix by a scalar, difference and multiplication of matrices. However, division of matrices is not possible in a direct way.

Addition of Two Matrices

If   A=[aij]  and   B=[bij] 

are two matrices of the same order, say m × n, then the sum of the two matrices A and B is defined as a matrix C=[cij]m×n

, where cij=aij+bij

, for all possible values of i and j.

i.e. C = A + B

are two matrices of order 3 x 2 such that the sum of these two matrices is given by:

C = A + B

Therefore,   

That means the sum or addition of two matrices is a matrix obtained by adding the corresponding elements of the given two matrices. Also, it is essential to note that the two matrices have to be of the same order.

Here, the order of the matrix A is 2 x 3 and the order of B is 2 x 3 are the same. So, we can add the given two matrices by adding the corresponding elements.

Example: Suppose

, then the addition of A and B is not possible since the order of matrix A is 2 x 2 and the order of B is 2 x 3, i.e. the order of these matrices is not equal.

Properties of Addition of Matrices

[1] Commutative Law: If A = [aij], B = [bij] are matrices of the same order, say m × n, then:

A + B = B + A

i.e. A + B = [aij] + [bij]

= [aij + bij]

= [bij + aij] (addition of numbers is commutative)

= ([bij] + [aij])

= B + A

Therefore, the addition of matrices is commutative.

Click here to understand the commutative law.

[2] Associative Law: For any three matrices A = [aij], B = [bij], C = [cij] of the same order, say m × n, then:

(A + B) + C = A + (B + C)

This can be shown as:

(A + B) + C = ([aij] + [bij]) + [cij]

= [aij + bij] + [cij]

= [(aij + bij) + cij]

= [aij + (bij + cij)] (addition of numbers is associative)

= [aij] + [(bij + cij)]

= [aij] + ([bij] + [cij])

= A + (B + C)

Also, read: Associative law

[3] Existence of additive identity: Let A = [aij] be an m × n matrix and O be an m × n zero matrix, then:

A + O = O + A = A

In other words, O is the additive identity for matrix addition.

[4] The existence of additive inverse: Let A = [aij] be any matrix of the order m × n, then we have another matrix as –A = [–aij]m × n such that A + (–A) = (–A) + A = O.

Thus, –A is the additive inverse of A or negative of A. The negative of a matrix is denoted by –A and it can be defined as –A = (–1) A.

Now, by equating the corresponding elements,

2x + 2 = 8

2x = 6

x = 3

Also, 2 + y = 5

y = 3

Therefore, x = 3 and y = 3.

Subtraction of matrices:

The Subtraction of matrices is possible only when the order of the two matrices is the same.

but for multiplication of matrices, we need to check if the number of columns of one matrix is equal to the number of rows of the second matrix.

If there are two matrices, say A = [aij] and B = [bij] of the same order, say m × n, then the subtraction of A and B, i.e., A – B is defined as:

Matrix D = [dij]

A – B = aij – bij

Thus,

dij = aij – bij, (i = 1,2,3,… and j= 1,2,3…)

D = A – B = aij – bij

A – B = A + (-B)

Subtraction of 2 x 2 Matrices

Suppose A and B are 2 x 2 matrices, such that;

Then, subtraction of matrices A and B, will be given as:

Fact: If A and B are two matrices of the same order, then;

A – B ≠ B – A

Thus, commutative law is not applicable for subtraction of matrices.

Subtraction of 3 x 3 Matrices

Suppose A and B are 3 x 3 matrices, such that; 

Then, subtraction of matrices A and B, will be given as:

Examples

Q.1: If A  and B are two matrices. Then find subtraction of matrices A and B.

Matrix Multiplication Definition

Matrix multiplication, also known as matrix product and the multiplication of two matrices, produces a single matrix. It is a type of binary operation.

If A and B are the two matrices, then the product of the two matrices A and B are denoted by:

X = AB

Hence, the product of two matrices is the dot product of the two matrices. 

Matrix multiplication by Scalar

Multiplication of an integer with a matrix is simply a scalar multiplication.

We know that a matrix is an array of numbers. It consists of rows and columns. If you multiply a matrix by a scalar value, then it is known as scalar multiplication. Another case is that it is possible to multiply a matrix by another matrix. Let’s have a look at the example given below for the same.

We may define multiplication of a matrix by a scalar mathematically as:

If A = [aij]m × n is a matrix and k is a scalar, then kA is another matrix obtained by multiplying each element of A by the scalar k.

In other words, kA = k [aij]m × n = [k (aij)]m × n, that is, (i, j)th element of kA is kaij for all possible values of i and j.

Example: Multiply the matrix

Matrix multiplication Condition

To perform multiplication of two matrices, we should make sure that the number of columns in the 1st matrix is equal to the rows in the 2nd matrix. Therefore, the resulting matrix product will have a number of rows of the 1st matrix and a number of columns of the 2nd matrix. The order of the resulting matrix is the matrix multiplication order.

Four  Types of multiplication :

 i) row by row             

 ii) row by column

 iii) column by column

 iv) column by row

Normally we multiply row by column method.

How to Multiply Matrices?

Let’s learn how to multiply matrices.

Consider matrix A which is a × b matrix and matrix B, which is a b ×c matrix.

Then, matrix C = AB is defined as the A × B matrix.

An element in matrix C, Cxy is defined as Cxy = Ax1By1 +….. + AxbBby = 

  AxkBky  for x = 1…… a  and y= 1…….c

Notation

If A is a m×n matrix and B is a p×q matrix, then the matrix product of A and B is represented by:

X = AB

Where X is the resulting matrix of m×q dimension.

Matrix Multiplication Formula

Let’s take an example to understand this formula.

Let’s say A and B are two matrices, such that,

Then Matrix C = AB is denoted by       

An element in matrix C where C is the multiplication of Matrix A X B.

C = Cxy = Ax1By1 +….. + AxbBby =(AB)ij=Cij=r=1nairbrj 

  AxkBky  for x = 1…… a  and y= 1…….c

Matrix multiplication Rules

Rules and properties for matrix multiplication.

  • The product of two matrices A and B is defined if the number of columns of A is equal to the number of rows of B.
  • If AB is defined, then BA need not be defined
  • If both A and B are square matrices of the same order, then both AB and BA are defined.
  • If AB and BA are both defined, it is not necessary that AB = BA.
  • If the product of two matrices is a zero matrix, it is not necessary that one of the matrices is a zero matrix.

2×2 Matrix Multiplication

Let a simple 2 × 2 matrix multiplication

Let a simple 2 × 2 matrix multiplication

And  another  matrix

Now each of the elements of product matrix AB can be calculated as follows:

  • AB11 = 3 × 6 + 7 ×5 = 53
  • AB12 = 3 × 2 + 7 × 8 = 62
  • AB21 = 4 × 6 + 9 × 5 = 69
  • AB22 = 4 × 2 + 9 × 8 = 80

3×3 Matrix Multiplication

The multiplication of two 3 × 3 matrices, let two 3 × 3 matrices A and B.

Each element of the Product matrix AB can be calculated as follows:

  • AB11 = 12×5 + 8×6 + 4×7 = 136
  • AB12 = 12×19 + 8×15 + 4×8 = 380
  • AB13 = 12×3 + 8×9+4×16 = 172
  • AB21 = 3×5 + 17×6 + 14×7 = 215
  • AB22 = 3×19 + 17×15 + 14×8 = 424
  • AB23 = 3×3 + 17×9 + 14×16 = 386
  • AB31 = 9×5 + 8×6 + 10×7 = 163
  • AB32 = 9×19 + 8×15 + 10×8 = 371
  • AB33 = 9×3 + 8×9 + 10×16 = 259

Properties of Matrix Multiplication

The following are the properties of the matrix multiplication:

Commutative Property

The matrix multiplication is not commutative.

Assume that, if A and B are the two 2×2 matrices, 

AB ≠ BA

In matrix multiplication, the order matters a lot.

For example, 

This shows that the matrix AB ≠BA.

Hence, the multiplication of two matrices is not commutative.

Associative Property

If A, B and C are the three matrices, the associative property of matrix multiplication states that, 

(AB) C = A(BC)

Hence, the associative property of matrix multiplication is proved.

Distributive Property

If A, B and C are the three matrices, the distributive property of matrix multiplication states that,

  • (B+C)A = BA +CA
  • A(B+C) = AB + AC

Multiplicative Identity Property

The identity property of matrix multiplication states that,

Dimension Property

In matrix multiplication, the product of m × n matrix and n×a matrix is the m× a matrix.

For example, matrix A is a 2 × 3 matrix and matrix B is a 3 × 4 matrix, then AB is a 2 × 4 matrices.

Multiplicative property of Zero

If a matrix is multiplied by a zero matrix, the result matrix is a zero matrix.