Matrix Basics

A matrix, by simplest definition, is a grid of numbers . It can have one or more horizontal rows and one or more vertical columns . Figure 18-1 shows some matrices.

image from book
Figure 18-1: A 3—3 matrix, a 1—3 matrix, and a 3—1 matrix

Any particular matrix is usually represented by some variable, such as M . To refer to a specific cell in a matrix, you use the variable name with the row and column number in subscript. For example, if the 3—3 matrix in Figure 18-1 is called M , then M2,3 is equal to 6, as it refers to the second row, third column.

The cells of a matrix can contain not only simple numbers, but also formulas and variables . If youve ever used a spreadsheet, that is basically one big matrix. You can have one cell hold the sum of a column, and another cell multiplies that sum by some fraction thats held in another cell, and so forth. So you see that matrices can be pretty useful.



Foundation ActionScript. Animation. Making Things Move
Foundation Actionscript 3.0 Animation: Making Things Move!
ISBN: 1590597915
EAN: 2147483647
Year: 2005
Pages: 137
Authors: Keith Peters

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net