Matrices, their types and sums · Mathematics Class 11–12 | StemPy Lab
Course 8.1·Lesson 1 of 3
Matrices, their types and sums
A matrix is a rectangular table of numbers. Its order is the number of rows by the number of columns. Two matrices are equal when they have the same order and the same entries in every place. You add matrices of the same order entry by entry, and you multiply a matrix by a number by multiplying every entry. Square, zero, identity, diagonal and triangular matrices are the special kinds.
about 25 min1 simulation1 practice question
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
What you will be able to do
read the order of a matrix and find any entry from its row and column;
recognise square, zero, identity, diagonal and triangular matrices;
decide when two matrices are equal, and find unknown entries from an equality;
add matrices, subtract them and multiply them by a number.
A table of numbers
A café sells tea, coffee and juice. In one week the first café sold 24, 18 and 10 cups. The second café sold 16, 22 and 12. Write the numbers as a table with one row for each café and one column for each drink:
A=[241618221012].
This table is a matrix. Each number is an entry. The matrix has 2 rows and 3 columns, so its order is 2×3, read "two by three". Some books say the dimensions are 2×3. The rows are always counted first.
The entry in row i and column j is written aij. Here a23=12, the juice sold by the second café. The first number of the pair is the row, the second is the column.
Kinds of matrix
A row matrix has one row, such as $
[314]
$. A column matrix has one column.
A square matrix has as many rows as columns. A 3×3 matrix is square, and its entries a11,a22,a33 form the main diagonal.
The zero matrixO has every entry 0.
A diagonal matrix is square and has 0 everywhere off the main diagonal, for example $
2000−10005
$.
A scalar matrix is a diagonal matrix whose diagonal entries are all equal.
The identity matrixI is the scalar matrix with every diagonal entry 1. The identity of order 3 is I3.
An upper triangular matrix has 0 below the main diagonal. A lower triangular matrix has 0 above it.
Every identity matrix is scalar, every scalar matrix is diagonal, and every diagonal matrix is both upper and lower triangular.
A grid with a blue triangle with corners (0, 0), (2, 0) and (1, 2), labelled P. A red triangle with corners (3, 1), (7, 1) and (5, 5) is labelled 2P plus S, where S moves every point 3 right and 1 up. Dashed grey arrows join each blue corner to the matching red corner. Beside the grid, the matrix P has the columns 0 0, 2 0 and 1 2, and each column is one corner.
Equal matrices
Two matrices are equal when they have the same order and every pair of entries in the same place is equal. So
[x+y32x−y]=[5321]
means x+y=5 and x−y=1. Adding gives 2x=6, so x=3 and y=2.
Adding matrices and multiplying by a number
You can add two matrices only when they have the same order. Add the entries in the same places. For a second week of sales
B=[20181520129],A+B=[443433422221].
To multiply a matrix by a number k, multiply every entry by k. This number is called a scalar. The matrix −A is (−1)A, and A−B means A+(−B).
For example, with $A =
[1023]
andB =
[42−10]
$,
2A−3B=[2046]−[126−30]=[−10−676].
These rules hold for matrices of the same order, because they hold for numbers:
A+B=B+A and (A+B)+C=A+(B+C);
A+O=A and A+(−A)=O;
k(A+B)=kA+kB and (k+l)A=kA+lA.
A shape as a matrix
A computer stores a triangle as a matrix. Each column holds the x and y values of one corner. The triangle with corners (0,0), (2,0) and (1,2) is
P=[002012].
Then 2P is the same triangle twice as large. Adding $S =
[313131]
to2Pmoveseverycorner3totherightand1$ up. So adding matrices moves a shape, and multiplying by a number resizes it.
A worked example
Find a,b,c,d if $
[a+bc+d2a−c4]
=
[3754]
andalsoa = 2$.
Match the entries.a+b=3, 2a−c=5, c+d=7.
Use a=2. The first equation gives b=1. The second gives 4−c=5, so c=−1.
Finish.c+d=7 gives d=8.
Check.a+b=3, 2a−c=4+1=5 and c+d=7. All three agree.
Practise with new numbers
Try it in Python
The program stores the two weeks of sales as arrays. It finds the order, picks one entry, adds the weeks and builds some special matrices.
Common mistakes
Adding matrices of different orders. The sum is not defined. A 2×3 matrix and a 3×2 matrix cannot be added.
Swapping the row and the column. In aij the row comes first. A matrix with 3 rows and 5 columns has order 3×5, not 5×3.
Multiplying only one entry by k. The number multiplies every entry.
Calling a matrix diagonal when it is not square. A diagonal matrix is square.
Treating a matrix as one number. $
[5]
isa1 \times 1$ matrix, and an equality of matrices is an equality of every entry.
Remember these
The order is rows by columns. The entry aij is in row i and column j.
Equal matrices have the same order and equal entries in every place.
Add matrices of the same order entry by entry. A scalar multiple multiplies every entry.
Identity, scalar, diagonal and triangular matrices are special square matrices.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
A matrix has 3 rows and 5 columns. What is its order, and how many entries does it have?
Find x and y if $
[2x13y+1]
=
[8136]
$.
If $A =
[13−20]
,write3A$.
[39−60]
$.
Is $
100240356
$ upper triangular? Is it diagonal?
If $A =
[1324]
andA + B =
[5555]
,findB$.
[4231]
$.
References
NCERT, Mathematics Textbook for Class XII, Part I, Chapter 3 (Matrices), sections on the types of matrices and the operations.
OpenStax, Precalculus 2e, Section 9.5 (Matrices and Matrix Operations).
Enroll free in Matrices and Matrix Algebra
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.