Loading AI tools
Array of numbers From Wikipedia, the free encyclopedia
In mathematics, a matrix (pl.: matrices) is a rectangular array or table of numbers, symbols, or expressions, with elements or entries arranged in rows and columns, which is used to represent a mathematical object or property of such an object.
For example, is a matrix with two rows and three columns. This is often referred to as a "two-by-three matrix", a " matrix", or a matrix of dimension .
Matrices are commonly related to linear algebra. Notable exceptions include incidence matrices and adjacency matrices in graph theory.[1] This article focuses on matrices related to linear algebra, and, unless otherwise specified, all matrices represent linear maps or may be viewed as such.
Square matrices, matrices with the same number of rows and columns, play a major role in matrix theory. Square matrices of a given dimension form a noncommutative ring, which is one of the most common examples of a noncommutative ring. The determinant of a square matrix is a number associated with the matrix, which is fundamental for the study of a square matrix; for example, a square matrix is invertible if and only if it has a nonzero determinant and the eigenvalues of a square matrix are the roots of a polynomial determinant.
In geometry, matrices are widely used for specifying and representing geometric transformations (for example rotations) and coordinate changes. In numerical analysis, many computational problems are solved by reducing them to a matrix computation, and this often involves computing with matrices of huge dimensions. Matrices are used in most areas of mathematics and scientific fields, either directly, or through their use in geometry and numerical analysis.
Matrix theory is the branch of mathematics that focuses on the study of matrices. It was initially a sub-branch of linear algebra, but soon grew to include subjects related to graph theory, algebra, combinatorics and statistics.
A matrix is a rectangular array of numbers (or other mathematical objects), called the entries of the matrix. Matrices are subject to standard operations such as addition and multiplication.[2] Most commonly, a matrix over a field F is a rectangular array of elements of F.[3][4] A real matrix and a complex matrix are matrices whose entries are respectively real numbers or complex numbers. More general types of entries are discussed below. For instance, this is a real matrix:
The numbers, symbols, or expressions in the matrix are called its entries or its elements. The horizontal and vertical lines of entries in a matrix are called rows and columns, respectively.
The size of a matrix is defined by the number of rows and columns it contains. There is no limit to the number of rows and columns, that a matrix (in the usual sense) can have as long as they are positive integers. A matrix with rows and columns is called an matrix, or -by- matrix, where and are called its dimensions. For example, the matrix above is a matrix.
Matrices with a single row are called row vectors, and those with a single column are called column vectors. A matrix with the same number of rows and columns is called a square matrix.[5] A matrix with an infinite number of rows or columns (or both) is called an infinite matrix. In some contexts, such as computer algebra programs, it is useful to consider a matrix with no rows or no columns, called an empty matrix.
Name | Size | Example | Description | Notation |
---|---|---|---|---|
Row vector | 1 × n | A matrix with one row, sometimes used to represent a vector | ||
Column vector | n × 1 | A matrix with one column, sometimes used to represent a vector | ||
Square matrix | n × n | A matrix with the same number of rows and columns, sometimes used to represent a linear transformation from a vector space to itself, such as reflection, rotation, or shearing. |
The specifics of symbolic matrix notation vary widely, with some prevailing trends. Matrices are commonly written in square brackets or parentheses, so that an matrix is represented as This may be abbreviated by writing only a single generic term, possibly along with indices, as in or in the case that .
Matrices are usually symbolized using upper-case letters (such as in the examples above), while the corresponding lower-case letters, with two subscript indices (e.g., , or ), represent the entries. In addition to using upper-case letters to symbolize matrices, many authors use a special typographical style, commonly boldface Roman (non-italic), to further distinguish matrices from other mathematical objects. An alternative notation involves the use of a double-underline with the variable name, with or without boldface style, as in .
The entry in the i-th row and j-th column of a matrix A is sometimes referred to as the or entry of the matrix, and commonly denoted by or . Alternative notations for that entry are and . For example, the entry of the following matrix is 5 (also denoted , , or ):
Sometimes, the entries of a matrix can be defined by a formula such as . For example, each of the entries of the following matrix is determined by the formula .
In this case, the matrix itself is sometimes defined by that formula, within square brackets or double parentheses. For example, the matrix above is defined as or . If matrix size is , the above-mentioned formula is valid for any and any . This can be specified separately or indicated using as a subscript. For instance, the matrix above is , and can be defined as or .
Some programming languages utilize doubly subscripted arrays (or arrays of arrays) to represent an m-by-n matrix. Some programming languages start the numbering of array indexes at zero, in which case the entries of an m-by-n matrix are indexed by and .[6] This article follows the more common convention in mathematical writing where enumeration starts from 1.
The set of all m-by-n real matrices is often denoted or The set of all m-by-n matrices over another field, or over a ring R, is similarly denoted or If m = n, such as in the case of square matrices, one does not repeat the dimension: or [7] Often, , or , is used in place of
Several basic operations can be applied to matrices. Some, such as transposition and submatrix do not depend on the nature of the entries. Others, such as matrix addition, scalar multiplication, matrix multiplication, and row operations involve operations on matrix entries and therefore require that matrix entries are numbers or belong to a field or a ring.[8]
In this section, it is supposed that matrix entries belong to a fixed ring, which is typically a field of numbers.
The sum A + B of two m×n matrices A and B is calculated entrywise: For example,
The product cA of a number c (also called a scalar in this context) and a matrix A is computed by multiplying every entry of A by c: This operation is called scalar multiplication, but its result is not named "scalar product" to avoid confusion, since "scalar product" is often used as a synonym for "inner product". For example:
The subtraction of two m×n matrices is defined by composing matrix addition with scalar multiplication by –1:
The transpose of an m×n matrix A is the n×m matrix AT (also denoted Atr or tA) formed by turning rows into columns and vice versa: For example:
Familiar properties of numbers extend to these operations on matrices: for example, addition is commutative, that is, the matrix sum does not depend on the order of the summands: A + B = B + A.[9] The transpose is compatible with addition and scalar multiplication, as expressed by (cA)T = c(AT) and (A + B)T = AT + BT. Finally, (AT)T = A.
Multiplication of two matrices is defined if and only if the number of columns of the left matrix is the same as the number of rows of the right matrix. If A is an m×n matrix and B is an n×p matrix, then their matrix product AB is the m×p matrix whose entries are given by dot product of the corresponding row of A and the corresponding column of B:[10]
where 1 ≤ i ≤ m and 1 ≤ j ≤ p.[11] For example, the underlined entry 2340 in the product is calculated as (2 × 1000) + (3 × 100) + (4 × 10) = 2340: