Matrix

Pronunciation: /ˈmeɪ trɪks/ ?

-- plural is matrices.

A matrix with 2 rows and 3 columns.
Figure 1: 2x3 matrix

A matrix is made up of values arranged in rows and columns. In advanced math, the values can be variables, equations or even other matrices. This article will deal with matrices that contain only numbers.

Article Index

Matrix
blank spaceMatrix Dimension
blank spaceSquare Matrix
blank spaceblank spaceDiagonal of a Square Matrix
blank spaceAugmented Matrix
blank spaceMatrix Element
blank spaceblank spaceCorresponding Elements
blank spaceMatrix Addition
blank spaceScalar Multiplication
blank spaceMatrix Multiplication
blank spaceUsing Matrices to Solve Linear Systems
blank spaceDeterminant of a Matrix
blank spaceCramer's Rule

Matrix

A matrix is used to organize data. Once data is organized into a matrix, standard matrix operations can be performed to manipulate the data. Here is an example from retail sales. Table 1 contains sales information for the first three months of the year for a store. Table 2 contains sales information for the second three months of the year for the same store.

1st Quarter Sales, Store #482
JanuaryFebruaryMarch
Fruit$3045$2997$3200
Vegetables$4056$4227$4509
Pasta$2650$3204$3098
Dairy$5345$4723$4933
Figure 2: Table of first quarter sales.
2nd Quarter Sales, Store #482
AprilMayJune
Fruit$3420$3560$3700
Vegetables$4716$4850$4900
Pasta$3274$2840$2760
Dairy$4769$4799$4873
Figure 3: Table of second quarter sales.

These tables 1 and 2 can be organized into two matrices:

Matrix containing data from figure 2.
Figure 4: Matrix corresponding to table in figure 2.
Matrix containing data from figure 3.
Figure 5: Matrix corresponding to table in figure 3.

Notice that none of the labels are transferred to the matrix. However, the numbers in the rows and columns still have the same meaning. Everything in the first row is sales numbers for fruit. Everything in the second row is sales numbers for vegetables. Everything in the first column is the sales for the first month of the quarter.

Check mark Understanding Check

Click on the check box of the answer you think is correct.
  1. What is the meaning of matrix 2, row 3?
    Check boxSales of fruit.
    Check boxSales of vegetables.
    Check boxSales of pasta.
    Check boxSales of dairy products.
  2. What is the meaning of matrix 1, column 2?
    Check boxJanuary sales.
    Check boxFebruary sales.
    Check boxMay sales.
    Check boxJune sales.
  3. What is the meaning of matrix 1, column 1, row 2?
    Check boxSales of fruit in January.
    Check boxSales of vegetables in March.
    Check boxSales of fruit in April.
    Check boxSales of vegetables in May.

Matrix Dimension

Each matrix has a dimension. Since the matrix Matrix with one row and three columns. has 1 row and 3 columns, the dimensions of this matrix are 1x3.

MatrixNumber of RowsNumber of ColumnsDimensions
Matrix with 2 rows and 1 column212x1
Matrix with 2 rows and 2 columns222x2
Matrix with 3 rows and 4 columns343x4
Figure 6: Dimensions of Matrices

Square Matrix

A square 2x2 matrix.
Figure 7: A square 2x2 matrix

A square matrix is a matrix that has the same number of rows as columns. One property of a square matrix is that a square matrix can be multiplied by itself. This is not true for matrices that are not square.

Diagonal of a Square Matrix

The diagonal of a 3x3 square matrix
Figure 8: The diagonal of a 3x3 matrix

The diagonal of a square matrix A is the elements A1,1, A2,2, A3,3, …. In figure 8, the diagonal is highlighted in red. Some mathematicians call the diagonal of a matrix a main diagonal.

Augmented Matrix

An augmented matrix.
Figure 8a: An augmented matrix.

An augmented matrix is a square matrix with a column added. An augmented matrix is used to represent a linear system. Each column of the square matrix represents a variable. The augmented part of the matrix represents the constant term of each linear equation. An augmented matrix is sometimes represented using a vertical line to separate the square matrix from the augmented part. See figure 8b.

An augmented matrix with a vertical separator.
Figure 8b: Augmented matrix with a vertical separator.

Matrix Element

Matrix A with element in the second row, first column highlighted.
Figure 9: Matrix A
Each entry in a matrix is called a matrix element. Each element is identified by row and column in the array. The highlighted element in matrix A is identified as A[2,1]. This means the element in the second row, first column of matrix A.

Check mark Understanding Check

Click on the check box of the answer you think is correct.
  1. What is the value of the element A[3,2]?
    Check box1
    Check box4
    Check box5
    Check box8
  2. What is the value of the element A[1,3]?
    Check box1
    Check box3
    Check box5
    Check box7
  3. What element of Matrix A has a value of 1?
    Check boxA[1,1]
    Check boxA[1,2]
    Check boxA[2,1]
    Check boxA[2,2]

Corresponding Elements

Corresponding elements in matrices are elements at the same row and column. In figure 10, corresponding elements of the two matrices are the same color.

Two matrices with corresponding elements the same color.
Figure 10: Corresponding elements

Matrix Addition

Matrix addition is defined as adding corresponding elements. Let matrix

2x2 matrix B containing elements 1, 4, 2, 7
and matrix
2x2 matrix C containing elements 3, 5, 1, 0
To add the matrix B to C, add the value of B[1,1] to C[1,1], B[1,2] to C[1,2], and so on as follows:

addition of matrix B and C to get 2x2 matrix containing 4,9,3,7.
Figure 11: Matrix addition

Since each element in the first matrix must have a corresponding element in the second matrix, only matrices with the same dimensions can be added. Addition of matrices with different dimensions is undefined. This means that you can not add matrices with different dimensions.

Matrix subtraction is similar to matrix addition. Subtract corresponding elements.

Subtraction of matrix C from B to get 2x2 matrix containing -2, -1, 1, 7.
Figure 12: Matrix subtraction

Scalar Multiplication

A matrix being multiplied by the scalar 5.
Figure 13: Scalar multiplication

In scalar multiplication, a scalar is a number that is multiplied by each element of the matrix. Figure 13 shows the scalar 5 being multiplied by a matrix. Each element of the matrix is multiplied by five.

Matrix Multiplication

Matrix multiplication is defined as multiplying the elements of each row of the first matrix by each column of the second matrix. Figure 14 shows an example of matrix multiplication.

matrix [a11, a12, a13, a21, a22, a23]*[b11, b12, b21, b22, b31, b33]=[a11*b11+a12*b21+a13*b31,a11*b12+a12*b22+a13*b32,a21*b11+a22*b21+a23*b31,a21*b12+a22*b22+a23*b32]
Figure 14: Matrix multiplication.

To multiply two matrices, they must be compatible. This means that the number of columns in the first matrix must be the same as the number of columns in the second matrix. Figure 15 gives some examples of compatible and incompatible matrices.

Matrix 1Matrix 2Compatibility
2x2 matrix2x2 matrixCompatible. These matrices are compatible. They can be multiplied. The first matrix has 2 columns and the second matrix has 2 rows.
2x2 matrix3x3 matrixIncompatible. These matrices are incompatible. They can not be multiplied. The first matrix has 2 columns and the second matrix has 3 rows.
2x3 matrix3x3 matrixCompatible. These matrices are compatible. They can be multiplied. The first matrix has 3 columns and the second matrix has 3 rows.
3x3 matrix2x3 matrixIncompatible. These matrices are incompatible. They can not be multiplied. The first matrix has 2 columns and the second matrix has 3 rows. Note: These are the same matrices in the previous example, but have been reversed. This means that matrix multiplication is not commutative.
Figure 15: Matrix compatibility

It is easier to remember how to multiply matrices if you move the second matrix up. Take, for example, the matrix multiplication problem:

3x3 matrix multiplied by 3x2 matrix = ?
The second matrix is moved up like this:
3x3 matrix multiplied by 3x2 matrix
Now the columns and rows of the matrices that will be multiplied are aligned. Start with row 1 and column 1 of the matrix. The elements in the first row of the first matrix are multiplied by the elements in the first column of the second matrix:
3x3 matrix multiplied by 3x2 matrix with the first row of the first matrix highlighted and the first column of the second matrix highlighted.
2·0+(-3)·1+0·3 = 0-3+0 = -3. Now multiply row 1 of matrix 1 by column 2 of matrix 2.
3x3 matrix multiplied by 3x2 matrix with the first row of the first matrix highlighted and the second column of the second matrix highlighted.
2·(-1)+(-3)·2+0·(-3) = -2+6+0 = 4. Now multiply row 2 of matrix 1 by column 1 of matrix 2.
3x3 matrix multiplied by 3x2 matrix with the second row of the first matrix highlighted and the first column of the second matrix highlighted.
-2·(0)+1·1+(-6)·3 = 0+1-18 = -17. Continue in the same pattern until all the rows of the first matrix have been multiplied by all the rows of the second matrix.
3x3 matrix multiplied by 3x2 matrix the result being a 3x2 matrix.

This is how the problem look laid out horizontally:

3x3 matrix multiplied by 3x2 matrix the result being a 3x2 matrix.

More Information

  • McAdams, David. Determinant of a Matrix. allmathwords.org. Life is a Story Problem.org. 2009-03-12. http://www.allmathwords.org/article.aspx?lang=en&id=Determinant%20of%20a%20Matrix.
  • McAdams, David. Cramer's Rule. allmathwords.org. Life is a Story Problem.org. 2009-03-12. http://www.allmathwords.org/article.aspx?lang=en&id=Cramer's%20Rule.
  • McAdams, David. Zero Matrix. allmathwords.org. Life is a Story Problem.org. 2009-09-28. http://www.allmathwords.org/article.aspx?lang=en&id=Zero%20Matrix.

Educator Resources

  • Wired For Space (arrays). NASA LaRC Office of Education. 2010-02-18. http://www.archive.org/details/NasaConnect-WiredForSpace.

Cite this article as:


Matrix. 2009-09-28. All Math Words Encyclopedia. Life is a Story Problem.org. http://www.allmathwords.org/en/m/matrix.html.

Translations

Image Credits

Revision History


2009-09-28: Minor wording changes to improve readability. (McAdams, David.)
2008-12-03: Added 'More Information', link to Determinant (McAdams, David.)
2008-11-17: Added matrix multiplication (McAdams, David.)
2008-03-10: Initial version (McAdams, David.)

All Math Words Encyclopedia is a service of Life is a Story Problem.org.
Copyright © 2005-2011 Life is a Story Problem.org. All rights reserved.
Creative Commons License This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License