# Matrix Multiplication

In this article we are going to discuss what is a matrix and how we multiply two or more matrices.

## What is a Matrix?

• A matrix is a rectangular array of numbers or symbols which are generally arranged in rows and columns.

• The order of the matrix is defined as the number of rows and columns.

• The entries are the numbers in the matrix and each number is known as an element.

• The plural of matrix is matrices.

• The size of a matrix is referred to as ‘n by m’ matrix and is written as m×n, where n is the number of rows and m is the number of columns.

• For example, we have a 3×2 matrix, that’s because the number of rows here is equal to 3 and the number of columns is equal to 2.

### What are the Different Types of Matrices?

There are different types of matrices. Here they are –

1) Row matrix

2) Column matrix

3) Null matrix

4) Square matrix

5) Diagonal matrix

6) Upper triangular matrix

7) Lower triangular matrix

8) Symmetric matrix

9) Anti-symmetric matrix

We know what a matrix is. Let’s find the product of two or more matrices!

To multiply a matrix by a single number is a very easy and simple task to do:

Here are the calculations:

 2 × 4 = 8 2 × 0 = 0 2 × 1 = 2 2 × -9 = -18

We call the number (“2″ in this case) a scalar, so this is known as”scalar multiplication”.

### Multiplying a Matrix by Another Matrix-

• Matrix multiplication also known as matrix product .

• It is a binary operation that produces a single matrix by taking two or more different matrices.  We know that a matrix can be defined as an array of numbers.

• When we multiply a matrix by a scalar value, then the process is known as scalar multiplication.

•  In Mathematics one matrix by another matrix. Let us discuss how to multiply a matrix by another matrix, its algorithm, formula, 2×2 and 3×3 matrix multiplication. To multiply a matrix by another matrix we need to follow the rule “DOT PRODUCT”.

### Multiplication of Matrices

Now let’s learn how to multiply two or more matrices.

Let us consider matrix A which is a × b matrix and let us consider another matrix B which is a b ×c matrix.

Then matrix C which is the product of matrix A and matrix B can be written as = AB is defined as A × B matrix.

An element in product matrix C, Cxy can be defined as

Cxy = Ax1 By1 +….. + Axb Bby = $\sum_{k=1}^{b}A_{kx}B_{ky}$   for the values x = 1…… a and y= 1…….c

### Formula for Matrix Multiplication

Let’s take an example to understand the formula.

Let’s say we have A and B as two matrices, such that,

Then the Matrix C (Product matrix) = AB can be denoted by

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

An element in product matrix C, Cxy can be defined as

Cxy = Ax1 By1 +….. + Axb Bby = $\sum_{k=1}^{b}A_{kx}B_{ky}$ for the values x = 1…… a and y= 1…….c

### Conditions for Matrix Multiplication-

When we do Matrix multiplication, keep these two conditions in mind:

1. The number of columns of the first matrix in the multiplication process must equal the number of rows of the second matrix.

2. The result (product) will have the same number of rows as in the first matrix, and the same number of columns as in second matrix.

### Basics of Multiplication of Matrix-

The product  C of any two matrices suppose A and B can be defined as-

Cik = aij bjk

Here

is summed over for all possible values of i and k and the notation above makes use of the Einstein summation convention. The Einstein summation convention can be defined as summation over repeated indices without the presence of an explicit sum sign , and this method is commonly used in both matrix and tensor analysis.

(n x m) (m X P) = (n x p)

Here (a x b) denotes a matrix with the number of rows equal to a and number of columns equal to b. Writing out the product explicitly we get,

Where each of the values can be written as,

( Image to be added soon)

### Multiplication of 2×2 Matrix-

We will consider a simple 2 × 2 matrix multiplication A = $\begin{bmatrix} 3 & 7\\ 4 & 9 \end{bmatrix}$  and another matrix B = $\begin{bmatrix} 6 & 2\\ 5 & 8 \end{bmatrix}$

Now we can calculate each of the elements of product matrix AB as follows:

• Product of AB11 = 3 × 6 + 7 ×5 = 53

• Product  of AB12 = 3 × 2 + 7 × 8 = 62

• Product of AB21 = 4 × 6 + 9 × 5 = 69

• Product  of AB22 = 4 × 2 + 9 × 8 = 80

Therefore matrix AB is equal to,

AB = $\begin{bmatrix} 53 & 62\\ 69 & 80 \end{bmatrix}$

### Questions to Be Solved:

Question 1) Multiply the given matrix below by 2.

A = $\begin{bmatrix} 3 & 4 & 9\\ 12 &11 &35 \end{bmatrix}$

Solution) On multiplying the given matrix by 2,

We know that we have to do scalar multiplication in this case,

A = $\begin{bmatrix} 3 & 4 & 9\\ 12 &11 &35 \end{bmatrix}$

On multiplying by 2 , we get the product as ,

A = $\begin{bmatrix} 6 & 8 & 18\\ 24 & 22 &70 \end{bmatrix}$