Chapter 8: Matrices
A matrix is an array of elements that follow certain rules:
We use square brackets to enclose the array.
A matrix has rows and columns, and is said to be of order .
Always mention the rows first. Thus, the above example is
A matrix is square if the
# of rows ==
# of columns.
Some common square matrices:
- zero matrix is all
- identity matrix is all
0s except along the main diagonal (top left to bottom right) is
In computer graphics, we most commonly use square , , and matrices.
Two matrices are equal if
- they have the same
# of rows and columns
- their corresponding elements in each position are equal
If , then and .
Addition and Subtraction
Addition and subtraction of matrices is defined by addition and subtraction of corresponding elements.
We can only add and subtract matrices of the same order.