Matrix

Pronunciation: /ˈmeɪ.trɪks/ Explain

-- 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 Rows and Columns
blank spaceMatrix Dimension
blank spaceSquare Matrix
blank spaceblank spaceDiagonal of a Square Matrix
blank spaceAugmented Matrix
blank spaceMatrix Element
blank spaceblank spaceCorresponding Elements
blank spaceEquality of Matrices
blank spaceMatrix Addition
blank spaceScalar Multiplication
blank spaceMatrix Multiplication
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?
    no answerSales of fruit.
    no answerSales of vegetables.
    no answerSales of pasta.
    no answerSales of dairy products.
  2. What is the meaning of matrix 1, column 2?
    no answerJanuary sales.
    no answerFebruary sales.
    no answerMay sales.
    no answerJune sales.
  3. What is the meaning of matrix 1, column 1, row 2?
    no answerSales of fruit in January.
    no answerSales of vegetables in March.
    no answerSales of fruit in April.
    no answerSales of vegetables in January.

A Matrix is Organized in Columns and Rows

A three by three matrix in brackets. One vertical column is highlighted in red and labeled 'column'. One horizontal row is highlighted in blue and labeled 'row'.
Matrix rows and columns.

A matrix is organized in columns and rows. A column is a single vertical arrangement of values. A row is a single horizontal arrangement of values. A matrix can have one or more columns and one or more rows. If the values in the matrix represent real data, each column and each row has meaning.

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
A square 2x2 matrix.222x2
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]?
    no answer1
    no answer4
    no answer5
    no answer8
  2. What is the value of the element A[1,3]?
    no answer1
    no answer3
    no answer5
    no answer7
  3. What element of Matrix A has a value of 1?
    no answerA[1,1]
    no answerA[1,2]
    no answerA[2,1]
    no answerA[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

Equality of Matrices

Two matrices are equal if and only if two conditions are met:

  1. The matrices have exactly the same number of rows and columns.
  2. The corresponding elements of the matrices are equal.
Examples of Matrix Equality
ExampleDiscussion
Matrix with two rows, three columns: row 1: 0, 5, -2; row 2: -1, 3, 7. Equals sign. Matrix with two rows, three columns: row 1: 0, 5, -2; row 2: -1, 3, 7. These two matrices are equal. They have the same number of rows and the same number of columns and their corresponding elements are equal.
Matrix with two rows and two columns: row 1: 4, 2; row 2: 3, 7. Not equals sign. Matrix with two rows and two columns: row 1: -1, 2; row 2: 3, 7. These matrices are not equal. The have the same number of rows and the same number of columns, but the elements in position 1,1 are not equal.
Matrix with two rows and two columns: row 1: 4, 2; row 2: 3, 7. Not equals sign. Matrix with two rows and three columns: row 1: 4, 2, 1; row 2: 3, 7, -1. These matrices are not equal. While the corresponding elements are equal, the first matrix has two columns and the second matrix has three columns.
Table 11 - Examples of matrix equality.

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 12: 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 13: Matrix subtraction

Scalar Multiplication

A matrix being multiplied by the scalar 5.
Figure 14: 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 15 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 15: 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 rows in the second matrix. Figure 16 gives some examples of compatible and incompatible matrices.

Matrix 1Matrix 2Compatibility
2x2 matrix 2x2 matrix Compatible. These matrices are compatible. They can be multiplied. The first matrix has 2 columns and the second matrix has 2 rows.
2x2 matrix 2x3 matrix Incompatible. These matrices are incompatible. They can not be multiplied. The first matrix has 2 columns and the second matrix has 3 rows.
2x3 matrix 3x3 matrix Compatible. These matrices are compatible. They can be multiplied. The first matrix has 3 columns and the second matrix has 3 rows.
3x3 matrix 2x3 matrix Incompatible. 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 16: 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.

References

  1. McAdams, David E.. All Math Words Dictionary, matrix. 2nd Classroom edition 20150108-4799968. pg 114. Life is a Story Problem LLC. January 8, 2015. Buy the book

More Information

  • McAdams, David E.. Determinant of a Matrix. allmathwords.org. All Math Words Encyclopedia. Life is a Story Problem LLC. 3/12/2009. http://www.allmathwords.org/en/d/determinant.html.

Educator Resources

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

Cite this article as:

McAdams, David E. Matrix. 4/25/2019. All Math Words Encyclopedia. Life is a Story Problem LLC. http://www.allmathwords.org/en/m/matrix.html.

Image Credits

Revision History

4/25/2019: Changed equations and expressions to new format. (McAdams, David E.)
12/21/2018: Reviewed and corrected IPA pronunication. (McAdams, David E.)
9/2/2018: Removed broken links, updated license, implemented new markup. (McAdams, David E.)
8/7/2018: Changed vocabulary links to WORDLINK format. (McAdams, David E.)
3/30/2011: Added information on columns and rows. (McAdams, David E.)
9/28/2009: Minor wording changes to improve readability. (McAdams, David E.)
12/3/2008: Added 'More Information', link to Determinant. (McAdams, David E.)
11/17/2008: Added matrix multiplication. (McAdams, David E.)
3/10/2008: Initial version. (McAdams, David E.)

All Math Words Encyclopedia is a service of Life is a Story Problem LLC.
Copyright © 2018 Life is a Story Problem LLC. All rights reserved.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License