Learn US

Basics of Matrices

72 views

Table of Contents

1. Introduction
2. What is a Matrix?
3. Addition of Matrices
4. Subtraction of Matrices
5. Multiplication of Matrices
6. Example
7. Summary

September 8, 2020,     

Reading Time: 5 mins       

Introduction

This article talks about Matrices, how they are represented and the simple operations that can be performed on Matrices. We will also see a real-time example where a Matrix can be used effectively to solve a mathematical problem statement.


What is a Matrix?

To put it simply, Matrix is a rectangular arrangement of rows and columns. Numbers, symbols, shapes, objects, etc. can be arranged in rows and columns as shown here.  They are called Elements.
The plural of Matrix is Matrices.

Matrix

Notations

A matrix is always expressed as a capital letter, like A, B, and so on... The elements inside a matrix are denoted by lower case letters along with subscripts referring to the row and column numbers.

A row is horizontal and runs from left to right
A column is vertical and runs from top to bottom

An example notation is shown below

Matrix

a1,1 refers to the element in the first row and the first column, a1,2 refers to the element in first row and second column, and so on.

Dimensions

The dimension of a matrix is determined by the number of columns and rows it has. Number of rows are mentioned first, followed by the number of columns.
For instance, in the following matrix, there are 2 rows and 4 columns. 
So, the dimension/size of this matrix is 2 × 3 (read as 2 by 3)

Matrix Dimensions

The number of elements in all the rows within the matrix must be the same. Similarly, the number of elements in all the columns must also be the same.                   
Let us see some examples here.

 matrix

The figure shown above does not represent a valid matrix, as there are only 2 elements in the first row while there are 3 elements in the second row. 
Similarly, if you watch closely, the number of elements in the first column and the second column is 2. But the number of elements in the third column is only 1. So, this is not a valid matrix.


Addition of Matrices

We can perform an addition operation on 2 Matrices, just like we add 2 numbers. We will see how it is done.
If two matrices are to be added, the dimensions (sizes) of both the matrices must be exactly the same. For example, we can add two 2 X 3 matrices. But not one 2 X 4 and one 2 X 2.

Let’s see an example of the addition of 2 similar-sized matrices,

matrix addition

Matrix addition is quite simple. We just need to add the elements in specific positions in Matrix 1 to the elements in the (same) corresponding positions in Matrix 2. In the example shown above, we need to add the number 2 in the first Matrix to the number 4 in the second Matrix and place the answer in the same position in the resultant Matrix.
Let us see how the resultant matrix looks like,     

matrix

Isn’t this simple?
Yes. But we have to remember this basic rule before carrying out the addition operation.

matrix


Subtraction of Matrices

Subtraction is similar to the addition operation.

matrix subtraction

Numbers in respective positions are subtracted and the answer placed in the same place. So, the answer will look like what is shown below.

matrix


Multiplication of Matrices

We can also carry out the multiplication of Matrices.
We will see the steps below.

Scalar Multiplication of a Matrix

First, let us see how to multiply a single number (constant) to a matrix.

matrix multiplication

We need to multiply the constant (number) to every element inside the matrix and then we get the answer as given below.

matrix

Multiplying a matrix by a constant number is called Scalar Multiplication.

Okay. But Is it possible to multiply two matrices? 
The answer is yes. We need to perform Dot Product of rows and columns in the matrices.

Dot Product of Matrices

Step 1:  Multiply the first element of the first row in the first matrix by the first element of the first column in the second matrix. Repeat a similar logic and multiply all the elements in the first row to the elements in the second column of the second Matrix.
And repeat all these steps for the second row in the first Matrix.

matrix       

matrix

matrix

matrix

matrix

Step 2: Add the products in each category and put the sums in the respective positions in the resultant matrix.
For example, for First row: First Column
 (2 × 3 = 6) + (6 × 7 = 42) + (9 × 1 = 9)

The answer 57 is written as shown below. The same process is repeated for all categories.

matrix multiplication         

When we go through the steps listed above, it is very clear that the first matrix and the second matrix need to be in a specific format for carrying out the multiplication operation.

So, what is the pre-requisite for multiplying two matrices?

matrix

Next, we will see an example of - how Matrices can be used for a practical mathematical problem.


Example

Three friends Rohan, Sam, and Neha scored the marks given below in the two consecutive tests in their schools. 

Name

Math

Science

English

History

Test 1

       

Rohan

97

90

93 88

Sam

99 100 90 80
Neha 100 80 88 79

Test 2

       

Rohan

87 89 78 90
Sam 96 80 72 80
Neha 92 99 90 76

They wanted to check their total scores in each subject in the last 2 tests. 
We can use Matrices to solve this quickly. Let us see how!
Let us begin, by listing the marks scored in the first test in the form a simple Matrix.


Test 1

matrix

Similarly, let us list down the marks scored in the second test.

matrix

Now, based on the method explained in this article, we will add Test 1 and Test 2 matrices to find the total score for each student in both the tests. 

matrix

Which gives us, 


matrix        

We now have the total scores for all three students in each of the 4 subjects.


Summary

In this article, we learned about Matrices, how they are represented, and how simple mathematical operations like Addition, subtraction, and multiplication can be performed on them.
We will continue to learn more about the properties and rules of Matrices in a more Advanced Matrices article, Matrices and Determinants.


Written by Gayathri Sivasubramanian, Cuemath Teacher


GIVE YOUR CHILD THE CUEMATH EDGE
Access Personalised Math learning through interactive worksheets, gamified concepts and grade-wise courses
Learn More About Cuemath