Jump to content

Matrix (mathematics)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Poor Yorick (talk | contribs) at 22:53, 29 April 2003. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In mathematics and computer science, a matrix (plural matrices) is a rectangular table of numbers or, more generally, of elements of a fixed ring. In Wikipedia, if unspecified, the entries of a matrix are always real or complex numbers.

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.

The term is also used in other areas, see matrix.

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 (or m×n matrix) and m and n are called its dimensions. For example the matrix below is a 4-by-3 matrix:

The entry of a matrix A that lies in the ith row and the j-th column is called the i,j-entry or (i,j)th entry of A.

This is written as A[i,j] or Ai,j, or in notation of the C programming language, 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, where aij is a scalar, usually real or complex.

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

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

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

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.

Linear transformations, Ranks and Transpose

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 rank of a matrix A is the dimension of the image of the linear map represented by A.

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. 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.

We have (A + B)tr = Atr + Btr and (AB)tr = Btr * Atr.


A square matrix is a matrix of which the number of rows and the number of columns are the same. The set of all square n-by-n matrices, together with matrix addition and matrix multiplication is a ring. Unless n = 1, this ring is not commutative.

M(n, R) , the ring of real square matrices, is a real unitary associative algebra. M(n, C), the ring of complex square matrices, is a complex associative algebra.

The unit matrix or identity matrix In, with elements on the main diagonal set to 1 and all other elements set to 0, satisfies MIn=M and InN=N for any m-by-n matrix M and n-by-k matrix N. For example, if n = 3:

The identity matrix is the identity element in the ring of square matrices.

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 ( = BA).

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

In a sense, the rank of a matrices measures "how close" the matrix is to being invertible.

An eigenvalue of a square matrix A is a number γ such that AIn is not invertible. Every complex square matrix has n eigenvalues. In certain sense, it is true for real square matrices also since they could be consider as complex matrices.

The determinant of a square matrix A is the product of its eigenvalues, but it can also defined by Leibniz formula. Invertible matrices are precisely those matrices with nonzero determinant.

The set of all invertible n-by-n matrices forms a group (specifically a Lie group) under matrix multiplication, the general linear group.

The trace of a square matrix is the sum of its diagonal entries, which equals the sum of its n eigenvalues.

Visit the Invertible Matrix Theorem, for a list of properties of invertible matrices.

Partitioned Matrix or Block Matrix is a matrix of matricies. For example, take a matrix P:

We could partition it into a 2-by-2 partitioned matrix like this:

This technique is used to cut down calculations of matricies, column-row expansions, and many computer science applications, including VLSI chip design.


Classes of real and complex matrices

Certain special matrices are so important that they are given special names, as listed in list of matrices. Below are some examples:

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 using Leibniz formula; a matrix is invertible if and only if its determinant is invertible in R.

Matrices over polynomial ring are important in the study of control theory.