Definition of Matrix
A matrix is a collection of numbers arranged into a fixed number of rows and columns. Usually the numbers are real numbers. In general, matrices can contain complex numbers but we won't see thosehere. Here is an example of a matrix:
The upper left corner of the matrix is row 1 column 1. In the above matrix the element at row 1 col 1 is the value a1,1. The element at row 2 column 3 is the value a2,3.
Names for Matrices
If you sometimes forget whether rows or columns come first, just remember that matrices are build out of rowman columns. A matrix can be given a name. In printed text, the name for a matrix is usually a capital letter in bold face, like A or M. Sometimes as a reminder the dimensions are written to the right of the letter, as in B3x3.The elements of a matrix also have names, usually a lowercase letter the same as the matrix name, with the position of the element written as a subscript. So, for example, the 3x3 matrix A might be written as:
Square Matrix :
Any matrix that has equal number of rows and columns is called square matrix. E.g: 2x2, 3x3 matrix.
2x2 Square Matrix | 3x3 Square Matrix | ||||||||||||||
|
|
Diagonal Matrix :
A Diagonal matrix is a square matrix with numbers on the leading diagonal and zeros in all other places.
Diagonal Matrix | |||||||||
|
Identity Matrix :
An identity matrix is a square matrix denoted as I. It has ones (1) down the leading diagonal and zeros in all other places.
2x2 identity | 3x3 identity | ||||||||||||||
|
|
Note: Any matrix multiplied by its identity matrix leaves the matrix unchanged.
It is similar to multiplying a number by 1.
i.e AI = A (where A is a matrix)
| x |
| = |
|
A zero or null matrix is a matrix with 0 as the element for all its cells (rows and columns).
Zero (null) Matrix | |||||||||
|
Symmetric Matrix :
A symmetric matrix is a matrix where aij = aji. i.e an element at the ith row, jth columns should be equal to the element at the jth row, ith columns.
Symmetric Matrix | |||||||||
|
Equality Matrix :
For any two matrices to be said as equal matrices they should be of same size and have same values.
Matrix Equality
For two matrices to be equal, they must have- The same dimensions.
- Corresponding elements must be equal.
Then A = B if and only if n=p, m=q, and aij=bij for all i and j in range.
Here are two matrices which are not equal even though they have the same elements.
Matrix Addition
If two matrices have the same number of rows and same number of columns,
then the matrix sum can be computed:
If A is an MxN matrix, and B is also an MxN matrix, then their sum is an MxN matrix formed by adding corresponding elements of A and BHere is an example of this:
Multiplication of a Matrix by a Scalar
A matrix can be multiplied by a scalar (by a real number) as follows:To multiply a matrix by a scalar, multiply each element of the matrix by the scalar.Here is an example of this. (In this example, the variable a is a scalar.)
Multiplying a Matrix by Another Matrix
But to multiply a matrix by another matrix you need to do the "dot product" of rows and columns ... what does that mean? Let me show you with an example:To work out the answer for the 1st row and 1st column:
The "Dot Product" is where you multiply matching members, then sum up:
Want to see another example? Here it is for the 1st row and 2nd column:
(1, 2, 3) • (7, 9, 11) = 1×7 + 2×9 + 3×11 = 58
We match the 1st members (1 and 7), multiply them, likewise for
the 2nd members (2 and 9) and the 3rd members (3 and 11), and finally
sum them up.
(1, 2, 3) • (8, 10, 12) = 1×8 + 2×10 + 3×12 = 64
We can do the same thing for the 2nd row and 1st column:
(4, 5, 6) • (7, 9, 11) = 4×7 + 5×9 + 6×11 = 139
And for the 2nd row and 2nd column:
(4, 5, 6) • (8, 10, 12) = 4×8 + 5×10 + 6×12 = 154
And we get:Matrix Subtraction
If A and B have the same number of rows and columns, then A - B is defined as A + (-B). Usually you think of this as:To form A - B, from each element of A subtract the corresponding element of B.Here is a partly finished example:
Transpose
The transpose of a matrix is a new matrix whose rows are the columns of the original (which makes its columns the rows of the original). Here is a matrix and its transpose:Usually we will work with square matrices, and it is usually square matrices that will be transposed. However, non-square matrices can be transposed, as well:
Rule for Transpose
If a transposed matrix is itself transposed, you get the original back:Determinant
The determinant of a matrix is a special number that can be calculated from the matrix. It tells us things about the matrix that are useful in system linear equations, in calculus and more.The symbol for determinant is two vertical lines either side.
Example:
|A| means the determinant of the matrix A
Calculating the Determinant
First of all the matrix must be square (i.e. have the same number of rows as columns). Then it is just a matter of basic arithmetic. Here is how:For 2×2 Matrix
For a 2×2 matrix (2 rows and 2 columns):
|A| = ad - bc
"The determinant of A equals a times d minus b times c"
"The determinant of A equals a times d minus b times c"
It is easy to remember when you think of a cross:
|
Example:
|B| | = 4×8 - 6×3 |
= 32-18 | |
= 14 |
For 3×3 Matrix
For a 3×3 matrix (3 rows and 3 columns):
|A| = a(ei - fh) - b(di - fg) + c(dh - eg)
"The determinant of A equals ... etc"
It may look complicated, but there is a pattern:"The determinant of A equals ... etc"
- Multiply a by the determinant of the 2×2 matrix that is not in a's row or column.
- Likewise for b, and for c
- Add them up, but remember that b has a negative sign!
Example:
|C| | = 6×(-2×7 - 5×8) - 1×(4×7 - 5×2) + 1×(4×8 - -2×2) | |||||||||
= 6×(-54) - 1×(18) + 1×(36) | ||||||||||
= -306
Inverse of a Matrix
You can calculate the Inverse of a Matrix by 1) calculating the
Matrix of Minors, 2) then turn that into the Matrix of Cofactors, 3)
then the Adjoint, and 4) multiply that by 1/Determinant. |
Think of a cross:
|
The Calculations
Here are the first two, and last two, calculations of the "Matrix of Minors" (notice how I ignore the values in the current row and columns, and calculate the determinant using the remaining values):Step 2: Matrix of Cofactors
This is easy! Just apply a "checkerboard" of minuses to the "Matrix of Minors". In other words, you need to change the sign of alternate cells, like this:Step 3: Adjoint (also called Adjugate)
Now "Transpose" all elements of the previous matrix... in other words swap their positions over the diagonal (the diagonal stays the same):Step 4: Multiply by 1/Determinant
Now find the determinant of the original matrix. This isn't too hard, because we already calculated the determinants of the smaller parts when we did "Matrix of Minors".
Determinant = 3×2 - 0×2 + 2×2 = 10
And now multiply the Adjugate by 1/Determinant:
Inverse of a Matrix
using Elementary Row Operations
Also called the Gauss-Jordan method.
This is a fun way to find the Inverse of a Matrix ... ... play around with the rows (adding, multiplying and swapping them) until you make your Matrix A into the Identity Matrix I. |
And by ALSO doing the changes to an Identity Matrix it magically turns into the Inverse! |
Example: find the Inverse of "A":
(This is called the "Augmented Matrix")
Identity Matrix
The "Identity Matrix" is the matrix equivalent of the number "1":A 3x3 Identity Matrix
- It is "square" (has same number of rows as columns),
- It has 1s on the diagonal and 0s everywhere else.
- It's symbol is the capital letter I.
Now we do our best to turn "A" (the Matrix on the left) into an Identity Matrix. The goal is to make Matrix A have 1s on the diagonal and 0s elsewhere (an Identity Matrix) ... and the right hand side comes along for the ride, with every operation being done on it as well.
But we can only do these "Elementary Row Operations":
- swap rows
- multiply or divide each element in a a row by a constant
- replace a row by adding or subtracting a multiple of another row to it
Start with A next to I In this example my first step was to add row 2 to row 1, then divide row 1 by 5, Then take 2 times the first row, and subtract it from the second row, Multiply second row by -1/2, Now swap the second and third row, Last, subtract the third row from the second row, And we are done! |
And matrix A has been made into an Identity Matrix ...
... and at the same time an Identity Matrix got made into A-1
No comments:
Post a Comment