Jump to content

Matrix

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by AxelBoldt (talk | contribs) at 14:11, 8 October 2002. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A matrix (plural matrices) is a rectangular table of numbers. Matrices are useful to record data that depend on two categories, such as the sales in three branches of a store in each of the four quarters of a year, or to keep track of the coefficients of linear expressions such as linear transformations and systems of linear equations. The field of mathematics that studies matrices is called matrix theory, a branch of linear algebra. Closely related terms from computing are "two-dimensional array" and "spreadsheet".

Horizontal lines in a matrix are termed rows while vertical lines are termed columns. If a matrix has m rows and n columns, then it is called an m-by-n matrix.

The position of an entry or element in a matrix is usually indicated with two indices as shown for this 4-by-3 matrix:


  / a11  a12  a13 \
  | a21  a22  a23 |
  | a31  a32  a33 |
  \ a41  a42  a43 /


As you see, in an expression aij the first index always denotes the row and the second index denotes the column of the element. If the matrix is called A, then the element in row i and column j is also written as A[i, j], or in C notation, A[i][j].

If two m-by-n matrices A and B are given, we may define their sum A + B as the m-by-n matrix computed by adding corresponding elements, i.e., (A + B)[i, j] = A[i] + B[j] for all i and j. Furthermore, given any real number or complex number c, we define the matrix cA by multiplying every element of A by c, i.e., (cA)[i, j] = c A[i, j] for all i and j. These two operations turn the set M(m, n, R) of all m-by-n matrices with real entries into a real vector space of dimension mn.

Matrices may also be multiplied, but the operation is not as simple as matrix addition. If A is an m-by-n matrix (i.e. m rows and n columns) and B is an n-by-p matrix (n rows, p columns), then their product AB is an m-by-p matrix (m rows, p columns) given by

(AB)[i, j] = A[i, 1] * B[1, j] + A[i, 2] * B[2, j] + ... + A[i, n] * B[n, j] for each pair i and j. For instance

/ 1  0  2 \   / 3  1 \   / 1*3+0*2+2*1  1*1+0*1+2*0 \   / 5  1 \
\-1  3  1 / * | 2  1 | = \-1*3+3*2+1*1 -1*1+3*1+1*0 / = \ 4  2 /    
              \ 1  0 /

This multiplication has the following properties:

  • (AB)C = A(BC) for all k-by-m matrices A, m-by-n matrices B and n-by-p matrices C ("associativity").
  • (A + B)C = AC + BC for all m-by-n matrices A and B and n-by-k matrices C ("distributivity").
  • C(A + B) = CA + CB for all m-by-n matrices A and B and k-by-m matrices C ("distributivity").

Matrices can conveniently represent linear transformations because matrix multiplication neatly corresponds to the composition of maps, as will be described next.

For every linear map f : Rn -> Rm there exists a unique m-by-n matrix A such that f(x) = Ax for all x in Rn. We say that the matrix A "represents" the linear map f. Here and in the sequel we identify Rn with the set of "rows" or n-by-1 matrices. Now if the k-by-m matrix B represents another linear map g : Rm -> Rk, then the linear map g o f is represented by BA. This follows from the above associativity.

The set M(n, R) of all square n-by-n matrices with real entries, together with matrix addition and matrix multiplication is a ring, in fact a real unitary associative algebra. Unless n = 1, this ring is not commutative. The unit matrix In, with all elements on the main diagonal set to 1 and all other elements set to 0, is the unit element of this ring. For example, if n = 3:

       / 1  0  0 \
I  =   | 0  1  0 |
 3     \ 0  0  1 /

Invertible elements in this ring are called invertible matrices or non-singular matrices. Most square matrices are invertible, namely all the ones with non-zero determinant. To compute the inverse of a matrix, use Gauss-Jordan elimination. The set Gl(n, R) of all invertible n-by-n matrices forms a group (specifically a Lie group) under matrix multiplication, the general linear group.

For non-invertible (and even non-square) matrices, the concept of rank is useful: in a sense, it measures "how close" the matrix is to being invertible.

The transpose of an m-by-n matrix A is the n-by-m matrix Atr (also sometimes written as AT or tA) gotten by turning rows into columns and columns into rows, i.e. Atr[i, j] = A[j, i] for all indices i and j. We have (A + B)tr = Atr + Btr and (AB)tr = Btr * Atr. If A describes a linear map with respect to two bases, then the matrix Atr describes the transpose of the linear map with respect to the dual bases, see dual space.

In the applications, for a given square matrix A it is often important to get a handle on those non-zero vectors x and numbers λ such that A x = λ x. Such a vector is called an eigenvector of A and λ is called an eigenvalue of A.

The sum of all the diagonal entries of a square matrix is called the trace of the matrix.

There are several classes of matrixes, that is, matrixes with special properties. Such classes are:

  • symmetric matrices are such that elements symmetric to the diagonal are equal, that is, ai,j=aj,i.
  • hermitian (or, self-adjoint) matrices are such that elements symmetric to the diagonal are each others complex conjugates, that is, ai,j=a*j,i, where the superscript '*' signifies complex conjugation.
  • Toeplitz matrices have common elements on their diagonals, that is, ai,j=ai+1,j+1.

See also the film The Matrix.
In biology, matrix is the name for one part of the mitochondrion.