Matrix (mathematics)

s, for the numbers at each of the **rows** & **columns**.]]

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 A, B and C, and there are rules for adding, subtracting and "multiplying" matrices together, but the rules are different than for numbers. As an example, the product  AB does not always give the same result as BA , which is the case for the multiplication of ordinary numbers.

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.

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

An example of a square matrix is 
:\begin{bmatrix}
 5 & -2 & 4 \\
 0 &  9 & 1 \\
-7 &  6 & 8 \\
\end{bmatrix}

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

### 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:
\det\left(
\begin{bmatrix}
a & b \\
c & d \\
\end{bmatrix}\right)
=ad - bc

For 3x3 matrices the formula is more complicated:
\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)

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 v_1 and v_2, then the determinant of *M* is the sum of the determinants of *M* with v_1 in place of *v* and *M* with v_2 in place of *v*. These two conditions are called *multi-linearity*.

## Related pages 
*Calculus
*Transpose
*Wave function
*Matrix analysis
*Matrix function
*Differential equation
*Classical mechanics
*Gaussian elimination
*Quantum mechanics
*Multivariable calculus
*Numerical linear algebra
*System of linear equations
*Eigenvalues and eigenvectors

## References 
## Other websites
; History
* MacTutor: Matrices and determinants 
* Matrices and Linear Algebra on the Earliest Uses Pages
* Earliest Uses of Symbols for Matrices and Vectors

; Online books
* 
* 
*Online Calculus Courses