topic badge
Middle Years

14.01 Representing information using matrices

Lesson

Often we can represent information in a rectangular group, like in the following table. This table of information can also be represented as a matrix.

Preferred colour Female Male
Black 13 6
Green 3 10
Purple 8 9

In mathematics, a matrix is a particular method of displaying information. It is any rectangular array of numbers, symbols, or expressions arranged in rows and columns. So the table above would be represented by a matrix, which we can call $A$A and is shown below.

We refer to the dimensions or order of a matrix as a reference to the number of rows and number of columns.

A matrix with dimensions $m\times n$m×n has $m$m rows and $n$n columns. For instance, the following matrix has dimensions $3\times4$3×4.

Elements are the individual entries of a matrix. An element can be identified by its position (that is, its row and column) in the matrix. For the following matrix $B$B, the elements in the second row and third column is $7$7, where we use the following notation $b_{23}=7$b23=7.

Generally, we may represent any matrix with m rows and n columns as shown.

 

Remember!

A matrix is a rectangular array of numbers, symbols or expressions.

The dimensions or order of a matrix is the number of rows and columns, denoted by $m\times n$m×n.

The elements of a matrix are the entries where $a_{ij}$aij denotes the element in the $i$ith row and $j$jth column of the matrix.

Types of matrices

A row matrix or row vector has just a single row. The following matrix $T$T is an example of a row matrix.

A column matrix or column vector has just a single column. The following matrix $M$M is an example of a column matrix.

A square matrix has an equal number of rows and columns. The matrices $G$G and $J$J are examples of square matrices.
     
A diagonal matrix is a square matrix with zero elements off of the leading diagonal or main diagonal. The leading diagonal represents the elements along the diagonal starting at the top-left to the bottom-right. The matrix $C$C is an example of a diagonal matrix.
 
 

A zero matrix is a matrix of any dimension where all of the elements are zero.

The identity matrix is a square matrix in which all the elements in the leading diagonal are ones and all other elements are zeros. Matrix $M$M is the $2\times2$2×2 identity matrix and matrix $N$N is the $3\times3$3×3 identity matrix.

    

Using matrices

Matrices can be used for storing and displaying information, as well as calculations and analysis of information in a vast variety of applications.

Worked examples

Example 1

Below is a network showing roads between towns. The information can be put into a matrix to make it easier to read.

We can construct a matrix, where the entries represent the number of paths between the towns.

We will need to set up a $5\times5$5×5 matrix, where each of the rows and columns represents a town.

 

The next step is to fill in the numbers of roads between them.

 
Example 2

A matrix can be used to represent the following two way frequency table for party preference for the over 30's and under 30's. We can let the rows represent the values of the party preferences and the columns represent the age groups.

Party preference Under 30's Over 30's
Labour $16$16 $22$22
Liberal $10$10 $19$19
Total $26$26 $41$41

Since the rows and columns in the two way frequency table correspond to the rows and columns of the matrix, we can simply transfer the information into a matrix.

The matrix is then given by the following:

Practice questions

Question 1

Suppose $M$M is a $3\times2$3×2 matrix.

  1. How many rows does $M$M have?

  2. How many columns does $M$M have?

Question 2

What is the entry at $a_{23}$a23 in $A$A$=$=
    $-1$1 $6$6 $5$5    
    $8$8 $-7$7 $-9$9    
    $4$4 $-2$2 $3$3    
?

question 3

The following are the costs of a train ticket during different periods.

Weekday: $\$7$$7 peak, $\$4$$4 off-peak

Weekend: $\$12$$12 peak, $\$6$$6 off-peak

Public Holiday: $\$18$$18 peak, $\$10$$10 off-peak

  1. Organise the data into a $3\times2$3×2 matrix.

    Let the rows represent the type of day, in the order Weekday, Weekend and Public Holiday from top to bottom.

    Let the columns represent the time of day, in the order peak and off-peak from left to right.

        $\editable{}$ $\editable{}$    
        $\editable{}$ $\editable{}$    
        $\editable{}$ $\editable{}$    
  2. Organise the data into a $2\times3$2×3 matrix.

    Let the rows represent the time of day, in the order peak and off-peak from top to bottom.

    Let the columns represent the type of day, in the order Weekday, Weekend and Public Holiday from left to right.

        $\editable{}$ $\editable{}$ $\editable{}$      
           
    $\editable{}$ $\editable{}$ $\editable{}$  
     

What is Mathspace

About Mathspace