Jump to content

Matrix (mathematics)

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

In mathematics, a matrix (plural matrices) is a rectangular table of numbers or, more generally, of elements of a fixed ring. (The term is also used in other areas, see matrix.)

Matrices are useful to record data that depends on two categories, and to keep track of the coefficients of systems of linear equations and linear transformations.

Notations

The horizontal lines in a matrix are called rows and the vertical lines are called columns. A matrix with m rows and n columns is called an m-by-n matrix and m and n are called its dimensions. For example the matrix below is a 4-by-3 matrix:

  / 1 2 3 \
  | 1 2 7 |
  | 4 9 2 |
  \ 6 1 5 /.

If A is a matrix, then the i,j-entry of A, i.e. the element in the i-th row and the j-th column, is written as A[i,j], or in C notation, A[i][j]. In the example above, A[2,3]=7.

The notation A = (aij) means that A[i,j] = aij for all indices i and j.

Adding and multiplying matrices

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, j] + B[i, j]. For example

  /1 3 2\   /0 0 5\   /1+0 3+0 2+5\   /1 3 7\
  |1 0 0| + |7 5 0| = |1+7 0+5 0+0| = |8 5 0|
  \1 2 2/   \2 1 1/   \1+2 2+1 2+1/   \3 3 3/.

See also Direct sum (Matrix).

If a matrix A and a number c are given, we may define the scalar product cA by (cA)[i, j] = cA[i, j]. For example

  2(1 8 -3) = (2*1 2*8 2*-3) = (2 16 -6).

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.

Multiplication of two matrices is well-defined only if the number of columns of the first matrix is the same as the number of rows of the second matrix. If A is an m-by-n matrix (m rows, n columns) and B is an n-by-p matrix (n rows, p columns), then their product AB is the 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").

For other, less commonly encountered ways to multiply matrices, see matrix multiplication.

Matrices and linear transformations

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.

Square matrices and invertible matrices

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. An n by n matrix A is invertible if and only if there exists a matrix B such that

AB = In.

In this case, B is the inverse matrix of A. To compute the inverse of a matrix, use Gauss-Jordan elimination.

In a certain sense, most square matrices are invertible, namely all the ones with non-zero determinant.

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.

Further definitions

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.

Classes of real and complex matrices

There are several classes of matrices, that is, matrices 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.
  • Vandermonde matrices, used especially in polynomial interpolation, have ai,j=gij-1 where the gi are real or complex numbers.

Matrices with entries in arbitrary rings

If we start with a ring R, we can consider the set M(m,n, R) of all m by n matrices with entries in R. Addition and multiplication of these matrices can be defined as above, and it has the same properties. The set M(n, R) of all square n by n matrices over R is a ring in its own right, isomorphic to the endomorphism ring of the left R module Rn.

If R is commutative, then M(n, R) is a unitary associative algebra over R. It is then also meaningful to define the determinant of square matrices; a matrix is invertible if and only if its determinant is invertible in R.