Matrix Multiplication Rules & Formula

In this tutorial, you will learn all about matrix multiplication. Here I've shown steps involed in matrix multiplication through pictorial representation. And I think pictorial representation is the best things to define any little complicated topics. Therefore, here is the two topics you are going to aware about:

  • What the Matrix is ?
  • How the multiplication of two matrix performs ?

I'll explain these two topics, in the term that can be understandable for any programmer over here.

What is Matrix ?

In Programming world, matrix is basically a two-dimensional (2D) array. Here two dimension means, the element of array arranged in two dimensions that are rows and columns. Rows are from top-to-bottom, whereas columns are from left-to-right. For example,

matrix multiplication

As you can see from the above matrix, there are total of m numbers or rows and n numbers of columns. And A11, A12, ....., Amn are the elements of matrix, arranged in a way, that the element

  • A11 is at 1st row, 1st column
  • A12 is at 1st row, 2nd column
  • A1n is at 1st row, nth column
  • A21 is at 2nd row, 1st column
  • A22 is at 2nd row, 2nd column
  • A2n is at 2nd row, nth column
  • Am1 is at mth row, 1st column
  • Am2 is at mth row, 2nd column
  • Amn is at mth row, nth column

How Matrix Multiplication Performs ?

To multiply any two matrices, we need to do the dot product of rows and columns. Before going to the step-by-step process of matrix multiplication. Let's first understand about matrix dot product. So to do the dot product of (1,2,3).(4,5,6). Here are the steps:

(1,2,3).(4,5,6)
=(1x4)+(2x5)+(3x6)
=4+10+18
=32

Now let's understand about matrix multiplication using the step by step process given below.

Step by Step Process of Matrix Multiplication

Here are the step by step process to multiply the two given matrix:

matrix multiplication steps

In first step, perform the dot product of first row's elements (of first matrix) to first column's elements (of second matrix) as shown below:

matrix multiplication first step

In second step, perform the dot product of first row's elements (of first matrix) to second column's elements (of second matrix) as shown below:

matrix multiplication second step

In third step, perform the dot product of second row's elements (of first matrix) to first column's elements (of second matrix) as shown below:

matrix multiplication third step

In fourth step, perform the dot product of second row's elements (of first matrix) to second column's elements (of second matrix) as shown below:

matrix multiplication fourth step

In this way, you can perform matrix multiplication.

Condition for Matrix Multiplication to be Perform

In order for matrix multiplication to be perform or defined, the number of columns in first matrix must be equal to the number of rows in second matrix.

Further Explanation on Matrix Multiplication

The binary process known as matrix multiplication creates a matrix from two matrices. The first matrix's columns must have the same number of rows as the next matrix's rows in order for matrices to be multiplied.

The first matrix's amount of rows as well as the secondary matrix's number of columns are combined to form the final matrix, or the matrix product. The letters AB stand for the result of the matrices A and B. Thus, matrix multiplication is a fundamental tool of linear algebra and already has various uses in many branches of pure and practical arithmetic including in statistics, physics, economics, as well as engineering.

Assuming we possess two matrix A and B, matrix A may be multiplied by matrix B using the formula (AB). To put it another way, the resulting matrix for multiplying any m x n matrix "A" with a n x q matrix "B" may be expressed as matrix "C" of order m x q.

By using the concept, "Initial rows were multiplied with columns (component by component), as well as then all rows were completely filled," we may grasp the general procedure of matrix multiplying. The basic methods can be used to multiply matrix:
Making ensuring that the amount of rows inside the second matrix matches the amount of columns within the first matrix is stage one.

The step two entails multiplying the components of the ith row of the very first matrix even by components of the j th column of the other matrix as well as then adding the results. That'd be the component of the resulting matrix which is under the ith row as well as jth column.

Phase 3 is set the additional goods in their proper locations.

Multiplication of 2x2 Matrix

Multiplication of 3x3 Matrix

Example of Matrix Multiplication

Find multiplication of A and B matrices. The Matrix A =

The Matrix B =

Therefore, A.B =

Programs Made on This


« Previous Tutorial Next Tutorial »

Like/Share Us on Facebook 😋