Matrix

From Math Images

Jump to: navigation, search

A matrix is a rectangular array of numbers with various applications throughout mathematics. An example of a matrix is

A = \begin{bmatrix}

1 & 3 & 0.5\\
-4 & 23 & 0 \\
\end{bmatrix}

Every matrix has a certain number of rows and columns. The above matrix in particular has 2 rows and 3 columns, so we call it a 2x3 matrix, or  A_{2 \times 3}. We refer to an entry by its row and column position. For example, entry  a_{22} in the above matrix is 23, and entry  a_{13} is 0.5.

Contents

[edit] Addition

Two matrices of that have the same dimensions can be added. Addition is carried out by entry by entry, as in the following example:

\begin{bmatrix}

1 & 2\\
4 & -6\\
-3 & 2\\
\end{bmatrix} +
\begin{bmatrix}

-2 & 0\\
3 & 6\\
1 & 0.5\\
\end{bmatrix}
=
\begin{bmatrix}

-1 & 2\\
7 & 0\\
-2 & 2.5\\
\end{bmatrix}

[edit] Scalar Multiplication

Matrices of any size can be multiplied by scalars, again by component: 
2*\begin{bmatrix}

2 & 4\\
0 & -0.3\\

\end{bmatrix}=
\begin{bmatrix}

4 & 8\\
0 & -0.6\\

\end{bmatrix}

[edit] Matrix Multiplication

Certain matrices can also be multiplied, although this operation is a bit more involved, and generally gives another matrix as the product. Notationally, multiplication signs are usually not used; instead we simply write two matrices next to each other to indicate multiplication. An example of matrix multiplication follows:

\begin{bmatrix}

1& 3 & -4\\
0 & 2 & -0.5\\

\end{bmatrix} 
\begin{bmatrix}

2& -1 \\
5 & 0\\
-1 & 3 \\

\end{bmatrix}

We proceed by multiplying the first row of the first matrix with the first column of the second matrix. Multiplying a row by a column means multiplying the two first entries with each other, then the two second entries, and finally the two third entries, then add each of these products.

(First row of first matrix)*(First column of second matrix) = \begin{bmatrix} 1&3&-4 \\ \end{bmatrix}*
\begin{bmatrix}

2\\
5\\
-1\\

\end{bmatrix} = (1*2)+(3*5)+(-4*-1) = 21

Because this quantity came from the first row and the first column of our respective matrices, it is the (1,1) entry of our product.

We must now multiply the first row of the first matrix by the second column of the second matrix, giving the (1,2) entry of our product:

 (1*-1) + (3*0) + (-4*3) = -13

Continuing, the (2,1) entry of our product is:

  (0*2) +(2*5) + (-0.5*-1) = 10.5

And the final, (2,2) component of our product is:

 (0*-1) + (2*0) + (-0.5*3) = -1.5

Therefore,

\begin{bmatrix}

1& 3 & -4\\
0 & 2 & -0.5\\

\end{bmatrix}
\begin{bmatrix}

2& -1 \\
5 & 0\\
-1 & 3 \\

\end{bmatrix} = 
\begin{bmatrix}

21   & -13 \\
10.5 & -1.5\\

\end{bmatrix}

As you may notice, the product AB only exists if A has as many columns as B has rows. In this case, we see that A is a two by three matrix, and B is a three by two matrix. Their product is a two by two matrix.

Using the subscript notation, AB exists if  A_{m \times n} and  B_{n \times j} . Since n is the number of columns of A, B must have n rows. This also means that AB can be denoted as  AB_{m\times j} , meaning that the matrix AB has m rows and j columns.

Also notice that matrix multiplication is not generally commutative, so AB ≠ BA, as shown below:


\begin{bmatrix}

1 & 2 \\
3 & 4\\

\end{bmatrix} 
\begin{bmatrix}

5 & 6\\
7 & 8\\
\end{bmatrix} 

=
\begin{bmatrix}

19 & 22\\
43 & 50\\
\end{bmatrix}
However, reversing the order of the matrices being multiplied gives a different product:

\begin{bmatrix}
5 & 6\\
7 & 8\\
\end{bmatrix} 
\begin{bmatrix}
1 & 2 \\
3 & 4\\
\end{bmatrix} 
=
\begin{bmatrix}
23 & 34 \\
31 & 46\\
\end{bmatrix}


This animation illustrates the process of matrix multiplication:

[edit] Multiplication of a Matrix by a Vector

A vector can really be thought of as a matrix with one column. This means that the product of an  m \times n matrix and an n-component vector exists. This product is also a vector, and is found in the same way as when we multiplied two matrices above.

An example of multiplying a matrix by a vector is: 
\begin{bmatrix}
2   & 4 \\
-1 & 0\\
\end{bmatrix}  

\begin{bmatrix}
3 \\
7 \\
\end{bmatrix} =

\begin{bmatrix}
34\\
-3\\
\end{bmatrix}

[edit] References

Another explanation of matrix operations: http://www.miislita.com/information-retrieval-tutorial/matrix-tutorial-2-matrix-operations.html

Browse images by...