Simple Operations with Mathematical Matrices
This is a brief study guide to explain rudimentary operations involving the mathematical matrices that are used in linear algebra.
Mathematical matrices are used to solve systems of linear equations. Matrices are used in applications such as physics, engineering, probability and statistics, economics, biology, and computer science. (especially in the area of computer graphics)
Matrices appear in the following form:
This matrix represents this system of linear equations:
x + 5y + 10z = 5
The above matrix has 4 rows and 4 columns, but the number of rows and columns do not have to be equal. In other words it does not have to a square matrix, only rectangular. Each entry can be an integer or real number. In the following examples I only use integers. In this explanation of the behaviors, I use the following notation for matrices.
a0_0 a0_1 a0_2 a0_3
a1_0 a1_1 a1_2 a1_3
a2_0 a2_1 a2_2 a2_3
a1_2 refers to the element in the row 1, column 2 In the actual matrix above that entry is equal to 12.
Adding matrices is only possible if they have an equal
number of rows and columns.
a1_0 a1_1 b1_0 b1_1 (a1_0 + b1_0) (a1_1 + b1_1)
b2_0 b2_1 (a2_0 + b2_0) (a2_1 + b2_1)
matrix a matrix
b result of a + b
Matrix subtraction works almost exactly like matrix addition. The two matrices must have the same number of rows and the same number of columns.
a matrix b
result of a - b
a1_0 a1_1 b1_0 b1_1 (a1_0 - b1_0) (a1_1 - b1_1)
b2_0 b2_1 (a2_0 - b2_0) (a2_1 - b2_1)
Matrix multiplication does not work as you would expect. You do not simply multiplying the matching elements. Instead matrices may be multiplied as long as the number of columns in the first matrix equals the number of rows in the second matrix. The number of rows in the resulting matrix is equal to the number of rows in the first matrix (the left hand side operand) and the number of columns in the resulting matrix is equal to the number of columns in the second matrix (the right hand side operand).
Here is an example
Here are the mechanics of matrix multiplication ( _ removed from notation of elements):
matrix a(3X2) matrix
b(2X3) result of a * b
a10 a11 b10 b11 b12 (a10*b00 + a11*b10) (a10*b01 + a11*b11) (a10*b02 + a11*b12)
a20 a21 (a20*b00 + a21*b10) (a20*b01 + a21*b11)
(a20*b02 + a21*b12)
Or more simply
2 4 3
4 1 10 40 18
|Scaling a Matrix||Scalar multiplication of a matrix is exactly what you would
think. Every element in the matrix is multiplied by the same constant.
Here is an example of scaling matrix a by the constant 2.
To transpose a matrix the rows of the
original matrix become the columns of the resulting matrix.. The Nth row of
the original matrix becomes the Nth column of the transposed matrix.
Back to the CS 307 homepage.