# Matrix

### matrices row column inverse

A matrix is a rectangular array of numbers or number-like elements:

In the example on the left, 1 1 and 2 0 are its rows; 1 2 and 1 0, its columns. In the example on the right there are three rows and two columns, making it a 3 × 2 matrix. When subscripted variables are used to represent the elements, the first subscript names the row, the second, the column: a _{row,} column. For example, a _{21} is in the second row and first column, but a_{12} is in the first row, second column. Except when there is danger of confusion, the subscripts need not be separated by a comma. Some authors enclose a matrix in brackets: other authors use parentheses, as above.

Matrices can also be represented with single letters A, I, or with a single subscripted **variable** (a_{ij} = b_{ij}) if and only if a_{ij} = b_{ij} for all i, j, which says symbolically that two matrices are equal when their corresponding elements are equal.

Under limited circumstances matrices can be added, subtracted, and multiplied. Two matrices can be added or subtracted only if they are the same size. Then (a_{ij}) + or - (b_{ij}) = (a_{ij}) = (b_{ij}), which says that the sum or difference of two matrices is the matrix formed by adding or subtracting the corresponding elements.

These rules for adding and subtracting matrices give matrix **addition** the same properties as ordinary addition and **subtraction**. It is closed (among matrices of the same size), commutative, and associative. There is an additive identity (the matrix consisting entirely of zeros) and an additive inverse:

This latter definition allows one to subtract a matrix by adding its opposite:

**Multiplication** is much trickier. For multiplication to be possible, the matrix on the left must have as many columns as the matrix on the right has rows. That is, one can multiply an m ×n matrix by an n ×q matrix but not an m ×n matrix by an p ×q matrix if p is not equal to n. The product of an m ×n matrix and an n ×q matrix will be an m ×q matrix.

Multiplication is best explained with an example:

The 5 in the product comes from (1) (5) + (3) (0). The -1 comes from (1) (2) + (3) (-1). The 7 comes from (1) (1) + (3) (2). In the second row of the product, 10 = (2) (5) + (2) (0); 3 = (2) (2) + (1) (-1); and 4 = (2) (1) + (1) (2).

Each row in the matrix on the left has been "multi plied" by each column in the matrix on the right. We say "multiplied" because each row on the left is a two-number row, and each column on the right is a two-number column. These numbers have been paired off, multiplied, and added. This kind of "multiplication" is somewhat more complicated than the ordinary sort. Those who are familiar with vectors will recognize this as forming the dot product of each row of the matrix on the left with each column on the right.

Multiplication is associative, but not communicative. That is (AB)C = A(BC) but, in general, AB does not equal BA.

In the example above, multiplication is not even possible if the 2 ×3 matrix is placed on the left.

There is a multiplicative identity, I. It is a **square** matrix of an appropriate size. It has 1s down the main diagonal and 0s elsewhere.

or

A matrix may or may not have a multiplicative inverse, which is a matrix A^{-1} such that A^{-1}A = I

Since

the two matrices on the left side of the equation are multiplicative inverses of each other.

An example of a matrix that does not have an inverse is

This can be seen by trying to solve the matrix equation

Using the row-by-column rule for multiplying gives

which is impossible.

Typically one limits the concept of an inverse to matrices which are square. Without this limitation a matrix such as

would have no left inverse at all and an infinitude of right inverses. Working only with square matrices, it is possible to show that a matrix and its inverse commute, that is, that any left inverse is also a right inverse. It is also possible to show that any inverse is unique.

Matrices are used in many ways. The following examples show three of those ways.

A matrix can be used to solve systems of linear equations. If

then the matrix equation AX = B represents the system

If one multiplies both sides of the matrix equation by the inverse of A (computed above) A^{-1}AX = A^{-1}B then×= A^{-1}B.

Writing these matrices in expanded form

For such a small system of equations, using matrices is rather inefficient. For systems with a large number of unknowns and equations, using matrices is very efficient, especially if one turns the work over to a computer. Computers love matrices.

Two-by-two matrices can be used to represent **complex numbers**:

They behave like complex numbers, and they sneak around the sometimes disturbing property

Matrices can be used for enciphering messages. If the message were "OUT OF WATER," it would first be converted to numbers using a = 1, b = 2, etc. to become 15 21 20 15 6 23 1 20 5 18. These numbers would then be broken into pairs, and each pair, treated as a 2 ×1 matrix, would then be multiplied by a secret enciphering matrix:

where 117 and 168 are reduced to numbers 26 or below by subtracting 26 as many times as needed. When this is done for the entire message, the numbers are converted back to letters, ML..., and the enciphered message is sent.

The recipient goes through the same steps, but uses a secret deciphering matrix:

which can be converted back to "OU...." This works because the product of the enciphering and the deciphering matrices is, after reducing the numbers by subtracting 26s, the identity matrix:

Multiplying the message first by the enciphering matrix, then by the deciphering is equivalent to multiplying it by the identity matrix. Therefore the original message is restored.

A two-by-two enciphering matrix does not conceal the message very well. A skilled crytanalyst could crack a long message or series of short ones very easily. (This one, by itself, would be too short for the cryptanalyst to do any of the statistical analyses needed for cracking it.) If the enciphering and deciphering matrices were bigger, say ten-by-ten, the encipherment would be reasonably secure.

## Resources

### Books

Bittinger, Marvin L, and Davic Ellenbogen. *Intermediate Algebra: Concepts and Applications.* 6th ed. Reading, MA: Addison-Wesley Publishing, 2001.

Eves, Howard Whitley. *Foundations and Fundamental Concepts of Mathematics.* NewYork: Dover, 1997.

Lay, David C. *Linear Algebra and Its Applications.* 3rd ed. Redding, MA: Addison-Wesley Publishing, 2002.

Weisstein, Eric W. *The CRC Concise Encyclopedia of Mathematics.* by New York: CRC Press, 1998.

J. Paul Moulton

## User Comments