5

What is a matrix exactly? What are matrices used for?

I have read some of the Wikipedia article, but since my math knowledge is pretty basic, I didn't understand much.

Could you explain to me in simple language what matrices are, and what they are used for?

For example, I know what a rotation matrix is and what it's used for, but don't know why it's called a 'matrix'. For me it's just a formula ($x' = x\cos\theta - y\sin\theta$, $y' = x\sin\theta + y\cos\theta$), that I can use to get the new position of a point after a rotation. Don't know why it's called a matrix and what matrices are and do in general.

Thanks

cygorx
  • 339
user3150201
  • 543
  • 2
  • 5
  • 15
  • 1
    It is a function from ${1,...,m} \times {1,...,n} \to \mathbb{R}$ (or whatever field you wish). – copper.hat Jan 07 '14 at 21:16
  • 5
    Matrix means womb, in Latin. Comes from mater, mother, but also meaning enclosure in the late 16th century. The use in math is referring to this meaning. It is enclosing all the data needed to compute. –  Jan 07 '14 at 21:19
  • 1
    Do you know what linear mappings are? A matrix is essentially a way to describe in concrete terms how a linear mapping transforms the space it acts on into its image when those spaces can be written in terms of a (finite) basis. I hate to punt answers, but I feel as if it's hard to say what matrices are without appealing to the concept of linear map. – Nick Jan 07 '14 at 21:19
  • In this way, the matrix of a linear system of equations is enclosing all the data needed to work with the system, and in particular solve it. –  Jan 07 '14 at 21:20
  • The matrix of a linear transformation is enclosing all the data needed to, somehow, compute the transformation. –  Jan 07 '14 at 21:21
  • The matrix of incidence, is enclosing all the information needed to draw a graph, or know the number of edges at each vertex. –  Jan 07 '14 at 21:22
  • 1
    It's intuitive to view a matrix as a simple table of values. An $n \times m$ matrix has $n$ rows and $m$ columns, hence $m \cdot n$ cells which each have a value. It's really nothing more than that. But then, you can define operations on matrices - for instance you can multiply them. That's what happens with rotation matrices. It just turns out that the product of the rotation matrix with the matrix having x and y as its values applies a rotation on x and y. – Manuel Lafond Jan 07 '14 at 21:22
  • Later, depending on what you are going to use the matrix for you may want to define ways to play with the matrix. Define operations on the matrix. These operations are defined in such a way that they correspond to operations you are interested about on the objects which are described by the information contained in the matrix. –  Jan 07 '14 at 21:25
  • For example: If the matrix is containing the coefficients of a linear system of equations, we can permute equations, add equations together, etc. In the same way we define permutation of rows of a matrix, adding a row to another, to imitate, to establish a correspondence with the same operations on the system of equations being represented. –  Jan 07 '14 at 21:26
  • @Karene In spanish language, matriz is 'matrix' and útero is 'womb'. Matriz spanish word is used as a synonym of útero in a popular sense while útero is the formal one. People can say matriz but I'm pretty sure they say útero when they go to the physician. Matriz also means the most important center of any thing like, for example, an car engine or something that can be used to produce exact copies of an object. I deviated from Math since I liked your comment. – Felix Marin Jan 07 '14 at 22:04
  • @FelixMarin That is because matriz also comes from the Latin word. –  Jan 07 '14 at 23:22

3 Answers3

4

A matrix is an array of numbers, expressions or symbols arranged in rows and columns as you may have read on Wikipedia. Matrices can be added, subtracted and multiplied. Division is a special case where instead of "dividing matrices" we find the inverse and multiply by that matrix. $(A/B=A\times \frac{1}{B}=A\times B^{-1})$ $$A= \begin{pmatrix} a_{11} & a_{12} & \cdots &a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots&\vdots\\ a_{m1} & a_{m2} & \cdots&a_{mn} \\ \end{pmatrix} $$ The matrix $A=(a_{ij})_{m\times n}$ where $a_{ij}\in R,\space (i=1,2,...m, \space j=1,2,...n)$, $m$ is the number of rows and $n$ is the number of columns. $m\times n$ is called the size of the matrix. It is possible to have a matrix with one row - this is called a row vector and its size is $1\times n$ as well as a matrix to have one column - this is called a column vector and its size is $m\times 1$. A matrix with size $n\times n$ is called a square matrix. Below is a row vector, column vector and square matrix respectively.

$$\left(3, \space 2,\space 5\right),\space \begin{pmatrix} 3\\ 7\\ 2\\ \end{pmatrix}, \space \begin{pmatrix} 3&5&5\\ 3&3&9\\ 1&2&2\\ \end{pmatrix}$$

Matrices have several uses and applications that can be applied to different applied areas. A major application of matrices is to represent linear transformations. Linear Transformations/Linear Mapping is a mapping between two modules $(L:V\to W)$ that preserve the operations of scalar multiplication and addition - we can consider this to be simply a generalization of linear functions. I will elaborate on this shortly.

To clear up your misconception, matrices can be expressed in a number of ways. And, furthermore, equations can be expressed as matrices. So for example if you have a system of equations, you can express it as a matrix. Let us look at the following system of equations:

$$2x + 3y – z = 6\\ –x – y – z = 9\\ x + y + 6z = 0\\$$ $$\left[ \begin{array}{ccc|c} 2&3&-1&6\\ -1&-1&-1&9\\ 1&1&6&0 \end{array} \right]$$

Writing down the coefficients of $x$, $y$ and $z$ and their solutions, we have represented this as a matrix. This matrix is called the augmented matrix (below). With the system of equations expressed as an augmented matrix, we can now solve and determine if the system is consistent (which means that there is one unique solution or infinitely many solutions to the system) or inconsistent (which means that there are no solutions to the system). Solving systems such like these have a variety of useful applications such as in business etc..and so many others - generally any problems with unknowns. Matrices thus makes it possible to solve a system of $3$ or more unknowns that would be time-consuming or difficult, imagine $6$ or even $10$ unknowns...

Note that the above set of matrices can also be represented as:

$$ \begin{pmatrix} 2 & 3 & -1 \\ -1 & -1 & -1 \\ 1 & 1 & 6 \\ \end{pmatrix} \begin{pmatrix} x\\ y\\ z\\ \end{pmatrix} =\begin{pmatrix} 6\\ 9\\ 0\\ \end{pmatrix} $$ A Rotation Matrix is a matrix that is used perform a rotation made in the Euclidean Space. So taking the two equations you mentioned..As we did with the above system of equations we can represent these as matrices.. $$x' = x\cos\theta - y\sin\theta\\ y' = x\sin\theta + y\cos\theta\\$$

$$\begin{pmatrix} x'\\ y'\\ \end{pmatrix} =\begin{pmatrix} \cos\theta &-\sin\theta\\ \sin\theta &\cos\theta\\ \end{pmatrix} \begin{pmatrix} x\\ y\\ \end{pmatrix}$$

When you consider the above representation you can clearly see that those two equations are indeed matrices and thus the name "Rotation Matrix". Plugging in any $(x,\space y)$ coordinate and using matrix multiplication, you can find the corresponding $(x',\space y')$ coordinates. This will yield the same answer if you had substituted $x$ and $y$ in the equations..

Now back to Linear Transformations... A linear transformation, $L$, is a function where $V$ and $W$ are vector spaces, $L:V\to W $ satisfying $L(k_1\mathbf x_1+k_2\mathbf x_2)=k_1L(\mathbf x_1)+k_2L(\mathbf x_2)$ for $\mathbf x_1, \mathbf x_2 \in V \text{and}\space k_1,\space k_2\in R$. Matrices allow linear transformations to be represented in a consistent format suitable for computation. If $L$ is a linear transformation mapping $V \to W$ and $\mathbf x$ is a column vector with $n$ entries then $L(\mathbf x)=A\mathbf x$ for some $m\times n$ matrix $A$. $A$ is called the matrix of transformation of $L$. Using the rotation matrix from above:

$$\begin{align} L(\mathbf x) & = A\mathbf x \\ & =\begin{pmatrix} \cos\theta &-\sin\theta\\ \sin\theta &\cos\theta\\ \end{pmatrix}\begin{pmatrix} x\\ y\\ \end{pmatrix}\\ & = \begin{pmatrix} x\cos\theta &-y\sin\theta\\ x\sin\theta &y\cos\theta\\ \end{pmatrix} \end{align}$$

$$\text{When}\space \theta = \frac{\pi}{2}$$ $$L\begin{pmatrix} x\\ y\\ \end{pmatrix}=\begin{pmatrix} x\cos\frac{\pi}{2} &-y\sin\frac{\pi}{2}\\ x\sin\frac{\pi}{2} &y\cos\frac{\pi}{2}\\ \end{pmatrix}=\begin{pmatrix} x(0) &-y(1)\\ x(1) &y(0)\\ \end{pmatrix}=\begin{pmatrix} -y\\ x\\ \end{pmatrix}$$

$$\text{When}\space \theta = \pi$$ $$L\begin{pmatrix} x\\ y\\ \end{pmatrix}=\begin{pmatrix} x\cos\pi &-y\sin\pi\\ x\sin\pi &y\cos\pi\\ \end{pmatrix}=\begin{pmatrix} x(-1) &-y(0)\\ x(0) &y(-1)\\ \end{pmatrix}=\begin{pmatrix} -x\\ -y\\ \end{pmatrix}$$

Zhoe
  • 2,415
  • 2
    +1 for not saying that "a matrix is a linear transformation" – Stefan Smith Jan 08 '14 at 02:14
  • @StefanSmith What about "a linear transformation is a matrix"? Just testing what kind of person you really are. –  Jan 08 '14 at 03:16
  • 1
    @Karene : since we're typing, I can't tell how serious you are, but a linear transformation isn't a matrix either, it's a function between vector spaces (satisfying certain properties). If it's not clear that they're not the same thing, of course the matrix depends on what bases you use for the vector spaces. I'm not certain what kind of person that makes me ;) – Stefan Smith Jan 08 '14 at 03:24
  • Arrrg. I wrote it wrong. The question intended was: What vote if the answer said "a linear transformation is a matrix"? The test is corrupted now. –  Jan 08 '14 at 03:35
  • @StefanSmith Apologies for resurrecting a thread this old but isn't a matrix meaningfully defined only as a "representation" of a linear transformation? Just any old array of numbers in a box wouldn't be a matrix, no? I need to know what are the properties of this object and how does it interact with other objects in the framework in which it lives, etc. Apologies if these questions are too naive, I have just never seen matrices being meaningfully present in any other context than as (representations of) linear maps. –  Aug 17 '21 at 18:50
2

Matrix means womb, in Latin. Comes from mater, mother, but also meaning 'enclosure containing something' in the late 16th century. The use in math is referring to this meaning. It is enclosing all the data needed to compute.

In this way, the matrix of a linear system of equations is enclosing all the data needed to work with the system, and in particular solve it. The matrix of a linear transformation is enclosing all the data needed to, somehow, compute the transformation. The matrix of incidence, is enclosing all the information needed to draw a graph, or know the number of edges at each vertex. Later, depending on what you are going to use the matrix for you may want to define ways to play with the matrix. Define operations on the matrix. These operations are defined in such a way that they correspond to operations you are interested about on the objects which are described by the information contained in the matrix.

For example: If the matrix is containing the coefficients of a linear system of equations, we can permute equations, add equations together, etc. In the same way we define permutation of rows of a matrix, adding a row to another, to imitate, to establish a correspondence with the same operations on the system of equations being represented.

But there are many operations that can be defined on a matrix. They depend on the nature of the information that you are trying to enclose in the matrix.

2

A matrix is a rectangular array of numbers (usually numbers, but matrices can contain anything you want). The most important application of a matrix (of numbers, or if you want to be general, elements of a field) is to represent a linear transformation between finite-dimensional vector spaces, manipulate such linear transformations, and determine their properties.

A linear transformation is a linear function from one vector space to another (in brief, it satisfies $T(a\mathbf{v})=aT(\mathbf{v})$ and $T(\mathbf{u} + \mathbf{v})=T(\mathbf{u})+T(\mathbf{v})$ for all scalars $a$ and vectors $\mathbf{u}$ and $\mathbf{v}$).

Undergraduate linear algebra students often have a great deal of trouble with the abstract notions of vector spaces and linear transformations, so it is usual to teach them about matrices first, even though it is safe to say that the most important application of matrices is to encode linear transformations (that is, you care about matrices mostly because of finite-dimenionsal vector spaces and linear transformations).

As noted above, a matrix can contain anything (not necessarily real or complex numbers, or elements of any field). For example, the Wronskian of a list of functions is defined as the determinant of a matrix whose elements are functions.

Stefan Smith
  • 8,192