Associated Topics || Dr. Math Home || Search Dr. Math

### Matrices and Computer Programming

```
Date: 11/05/96 at 23:01:21
From: Robert
Subject: Matrices

We are doing matrices in my Algebra II class and I was wondering why
matrix multiplication and matrix Algebra are the way they are.  I
understand how these formulas are used in computer programming but it
wasn't made for computers.  I really need to know why matrices are the
way they are and the history of them.
```

```
Date: 11/06/96 at 11:24:10
From: Doctor Tom
Subject: Re: Matrices

Hi Robert,

It seems a little strange to me that an algebra II book would talk
about matrices.  It is true that you know enough to be able to
multiply them (because it is just a simple pattern of additions
and multiplications), but what's the point of learning to do an
operation if you have no idea how to use it?

I can pretty much guarantee that you won't need them for a few
years.  I took my first course in linear algebra (where you learn
about the details of matrices) in my sophomore year (as a math
major) in college.

But I'll give it a crack.  Let's just look at 3x3 matrices.  You know,
I suppose, that you can identify points in three-dimensional space
with a collection of 3 numbers (x,y,z) that give the displacement
of the point from the origin.

Well, suppose you have a bunch of points in 3 dimensions, each
described with its own 3 numbers, and you'd like to find out
where they wind up if you rotate them about the x-axis by 45
degrees.  It turns out that there is a matrix that represents a
45 degree rotation about the x-axis, and if you multiply the
(x,y,z) by that matrix, the result will be rotated by 45 degrees.

Things like rotation, scaling, shearing, and so on are called
linear transformations, and every 3x3 matrix corresponds to a
linear transformation in 3-space.  (And every linear transformation
in 3-space corresponds to a 3x3 matrix.)

Now suppose you want to rotate first around the x-axis by 45 degrees,
then about the y-axis by 22 degrees.  Suppose the matrix M represents
the 45 degree rotation, and a matrix N represents the 22 degree
rotation (about a different axis).  Then the matrix MN (matrix
multiplication) corresponds to the combination of the operations.

In other words, if you work out the 3x3 product of M and N, you just
have to multiply your points (x,y,z) by that product to get the
combination of rotations in one operation.

I work in computer graphics, and as you can imagine, I do this sort
of thing all the time.

For information on the history of matrices, search the MacTutor
History Archive for the word matrix:

http://www-groups.dcs.st-and.ac.uk:80/~history/

Look for an article on "Matrices and Determinants."

-Doctors Tom and Rachel,  The Math Forum
Check out our web site!  http://mathforum.org/dr.math/
```
Associated Topics:
High School History/Biography
High School Linear Algebra

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search