Matrix (mathematics)
In mathematics, a matrix (plural: matrices) is a list of a list of numbers, where each list in the list has the same number of numbers. It's often represented as rectangle of numbers, arranged in rows and columns. The rows are each left-to-right (horizontal) lines, and the columns go top-to-bottom (vertical). The top-left cell is at row 1, column 1 (see diagram at right).
Matrices are often represented by capital roman letters such as [math]\displaystyle{ A }[/math], [math]\displaystyle{ B }[/math] and [math]\displaystyle{ C }[/math],[1] and there are rules for adding, subtracting and "multiplying" matrices together, but the rules are different than for numbers.[2] As an example, the product [math]\displaystyle{ AB }[/math] does not always give the same result as [math]\displaystyle{ BA }[/math], which is the case for the multiplication of ordinary numbers.[3] A matrix can have more than 2 dimensions, such as a 3D matrix. Also, a matrix can be one-dimensional, as a single row or a single column.
Many natural sciences use matrices quite a lot. In many universities, courses about matrices (usually called linear algebra) are taught very early, sometimes even in the first year of studies. Matrices are also very common in computer science, engineering, physics, economics, and statistics.[4]
Definitions and notations
The horizontal lines in a matrix are called rows. The vertical lines are called columns. A matrix with m rows and n columns is called an m-by-n matrix (or m×n matrix). m and n are called its dimensions.
The places in the matrix where the numbers are, are called entries.[2] The entry of a matrix called "A" that is in the row number i and column number j is called the i,j entry of A. This is written as A[i,j] or ai,j.
[math]\displaystyle{ A:=(a_{ij})_{m \times n} }[/math] defines a m × n matrix called A. Each entry in this matrix is called ai,j when "i" is between 1 and m, and when j is between 1 and n.
Example
The matrix
- [math]\displaystyle{ \begin{bmatrix} 1 & 2 & 3 \\ 1 & 2 & 7 \\ 4 & 9 & 2 \\ 6 & 1 & 5 \end{bmatrix} }[/math]
is a 4×3 matrix. This matrix has m=4 rows, and n=3 columns.
The element A[2,3] or a2,3 is 7.
Operations
Addition
The sum of two matrices is the matrix, which (i,j)-th entry is equal to the sum of the (i,j)-th entries of two matrices:
- [math]\displaystyle{ \begin{bmatrix} 1 & 3 & 2 \\ 1 & 0 & 0 \\ 1 & 2 & 2 \end{bmatrix} + \begin{bmatrix} 0 & 0 & 5 \\ 7 & 5 & 0 \\ 2 & 1 & 1 \end{bmatrix} = \begin{bmatrix} 1+0 & 3+0 & 2+5 \\ 1+7 & 0+5 & 0+0 \\ 1+2 & 2+1 & 2+1 \end{bmatrix} = \begin{bmatrix} 1 & 3 & 7 \\ 8 & 5 & 0 \\ 3 & 3 & 3 \end{bmatrix} }[/math]
The two matrices have the same dimensions. Here, [math]\displaystyle{ A + B = B + A }[/math] is true (and is true in general for matrices of equal dimensions).
Multiplication of two matrices
The multiplication of two matrices is a bit more complicated. First, find the dimensions of each matrix as [math]\displaystyle{ m\times n }[/math], where [math]\displaystyle{ m }[/math] is the number of rows, and [math]\displaystyle{ n }[/math] is the number of columns. If [math]\displaystyle{ A }[/math] has dimensions [math]\displaystyle{ m_1 \times n_1 }[/math] and [math]\displaystyle{ B }[/math] has dimensions [math]\displaystyle{ m_2 \times n_2 }[/math], then the matrix [math]\displaystyle{ AB }[/math] will have dimensions [math]\displaystyle{ m_1 \times n_2 }[/math]. The values of [math]\displaystyle{ n_1 }[/math]and [math]\displaystyle{ m_2 }[/math] must be equal, or else the multiplication of the two matrices is impossible.[3]
Multiply each row by each column. In the following example, to get the top left value of the resulting matrix, get the first row of the first matrix, [math]\displaystyle{ [a_1, a_2] }[/math], and the first column of the second matrix, [math]\displaystyle{ [b_1, b_3] }[/math]. Then sum the products of each corresponding index: [math]\displaystyle{ (a_1 \times b_1 + a_2 \times b_3) }[/math].
- [math]\displaystyle{ \begin{bmatrix} a_1 & a_2 \\ a_3 & a_4 \\ \end{bmatrix} \cdot \begin{bmatrix} b_1 & b_2 \\ b_3 & b_4 \\ \end{bmatrix} = \begin{bmatrix} (a_1 \cdot b_1 + a_2 \cdot b_3) & (a_1 \cdot b_2 + a_2 \cdot b_4) \\ (a_3 \cdot b_1 + a_4 \cdot b_3) & (a_3 \cdot b_2 + a_4 \cdot b_4) \\ \end{bmatrix} }[/math]
This is an example with numbers:
- [math]\displaystyle{ \begin{bmatrix} 3 & 5 \\ 1 & 4 \\ \end{bmatrix} \cdot \begin{bmatrix} 2 & 3 \\ 5 & 0 \\ \end{bmatrix} = \begin{bmatrix} (3\cdot 2 + 5 \cdot 5) & (3 \cdot 3 + 5 \cdot 0) \\ (1\cdot 2 + 4 \cdot 5) & (1 \cdot 3 + 4 \cdot 0) \\ \end{bmatrix} = \begin{bmatrix} 31 & 9 \\ 22 & 3 \\ \end{bmatrix} }[/math]
- The result of the multiplication is called the product. The product is another matrix. It has the same number of rows as the first matrix and the same number of columns as the second matrix.
- The multiplication of matrices is not commutative, which means that in general, [math]\displaystyle{ AB \neq BA }[/math].[4]
- The multiplication of matrices is associative, which means that [math]\displaystyle{ (AB)C = A(BC) }[/math].[4]
Special matrices
There are some matrices that are special.
Square matrix
A square matrix has the same number of rows as columns, so m=n.[5]
An example of a square matrix is
- [math]\displaystyle{ \begin{bmatrix} 5 & -2 & 4 \\ 0 & 9 & 1 \\ -7 & 6 & 8 \\ \end{bmatrix} }[/math]
This matrix has 3 rows and 3 columns: m=n=3.
Identity
Every square dimension set of a matrix has a special counterpart called the "identity matrix", represented by the symbol [math]\displaystyle{ I }[/math].[1] The identity matrix has nothing but zeroes except on the main diagonal, where there are all ones. For example:
- [math]\displaystyle{ \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{bmatrix} }[/math]
is an identity matrix. There is exactly one identity matrix for each square dimension set. An identity matrix is special because when multiplying any matrix by the identity matrix, the result is always the original matrix with no change.
Inverse matrix
An inverse matrix is a matrix that, when multiplied by another matrix, equals the identity matrix. For example:
- [math]\displaystyle{ \begin{bmatrix} 7 & 8 \\ 6 & 7 \\ \end{bmatrix} \cdot \begin{bmatrix} 7 & -8 \\ -6 & 7\\ \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ \end{bmatrix} }[/math]
[math]\displaystyle{ \begin{bmatrix} 7 & -8 \\ -6 & 7 \\ \end{bmatrix} }[/math] is the inverse of [math]\displaystyle{ \begin{bmatrix} 7 & 8 \\ 6 & 7 \\ \end{bmatrix} }[/math].
The formula for the inverse of a 2x2 matrix, [math]\displaystyle{ A = \begin{bmatrix} x & y \\ z & v \end{bmatrix} }[/math] is:
[math]\displaystyle{ \frac{1}{\det(A)} \begin{bmatrix} v & -y \\ -z &x \end{bmatrix} }[/math]
Where [math]\displaystyle{ \det }[/math] is the determinant of the matrix. In a 2x2 matrix, the determinant is equal to:
[math]\displaystyle{ {xv-yz} }[/math]
If the determinant is 0, then it is referred to as 'singular', and has no inverse.[6]
One column matrix
A matrix, that has many rows, but only one column, is called a column vector.
Determinants
The determinant takes a square matrix and calculates a simple number, a scalar. To understand what this number means, take each column of the matrix and draw it as a vector. The parallelogram drawn by those vectors has an area, which is the determinant. For all 2x2 matrices, the formula is very simple: [math]\displaystyle{ \det\left( \begin{bmatrix} a & b \\ c & d \\ \end{bmatrix}\right) =ad - bc }[/math]
For 3x3 matrices the formula is more complicated: [math]\displaystyle{ \det\left( \begin{bmatrix} a_1 & b_1 & c_1 \\ a_2 & b_2 & c_2 \\ a_3 & b_3 & c_3 \\ \end{bmatrix}\right) = a_1(b_2 c_3 - c_2 b_3) - a_2(b_1 c_3 - c_1 b_3) + a_3(b_1 c_2 - c_1 b_2) }[/math]
There are no simple formulas for the determinants of larger matrices, and many computer programmers study how to get computers to quickly find large determinants.
Properties of determinants
There are three rules that all determinants follow. These are:
- The determinant of an identity matrix is 1
- If two rows or two columns of the matrix are exchanged, then the determinant is multiplied by -1. Mathematicians call this alternating.
- If all the numbers in one row or column are multiplied by another number n, then the determinant is multiplied by n. Also, if a matrix M has a column v that is the sum of two column matrices [math]\displaystyle{ v_1 }[/math] and [math]\displaystyle{ v_2 }[/math], then the determinant of M is the sum of the determinants of M with [math]\displaystyle{ v_1 }[/math] in place of v and M with [math]\displaystyle{ v_2 }[/math] in place of v. These two conditions are called multi-linearity.
Matrix (mathematics)Identity Media
An m × n matrix: the m rows are horizontal and the n columns are vertical. Each element of a matrix is often denoted by a variable with two subscripts. For example, a2,1 represents the element at the second row and first column of the matrix.
Related pages
References
- ↑ 1.0 1.1 "Comprehensive List of Algebra Symbols". Math Vault. 2020-03-25. Retrieved 2020-08-19.
- ↑ 2.0 2.1 "Matrices". www.mathsisfun.com. Retrieved 2020-08-19.
- ↑ 3.0 3.1 "How to Multiply Matrices". www.mathsisfun.com. Retrieved 2020-08-19.
- ↑ 4.0 4.1 4.2 "Matrix | mathematics". Encyclopedia Britannica. Retrieved 2020-08-19.
- ↑ Weisstein, Eric W. "Matrix". mathworld.wolfram.com. Retrieved 2020-08-19.
- ↑ "Singular Matrix - Definition, Properties, Examples, Meaning". Cuemath. Retrieved 2024-09-20.
Other websites
The English Wikibook Linear Algebra has more information on: |
Wikiversity has more on: Matrices at |
- History
- MacTutor: Matrices and determinants Archived 2015-03-08 at the Wayback Machine
- Matrices and Linear Algebra on the Earliest Uses Pages
- Earliest Uses of Symbols for Matrices and Vectors
- Online books
- Kaw, Autar K. (September 2008), Introduction to Matrix Algebra, ISBN 978-0-615-25126-4
- Brookes, M. (2005), The Matrix Reference Manual, London: Imperial College, retrieved 2008-12-10
- Online Calculus Courses Archived 2018-07-08 at the Wayback Machine