Matrix
Matrix
Matrices are the main ingredient of a branch of mathematics called linear algebra
E.g. 2x + 3y = 10
-3x + 4y = 8.
To solve this, we can simply multiply the top by 3 and the bottom by 2 to eliminate x
What if there are not 2 variables, but 7 variables? Way messier to do:
x + y + 2z – w + a -2b – 3c = 8
We use matrix to simplify these into a series of rows and columns – brackets
1) Add them, as long as the number of rows and columns are the same
2) We can also multiply, but this is a little more tricky. The number of columns in the first matrix
must be equal to the number of rows in the second
Then, we multiply the first number in the first row of the first matrix to the first number in the
first column in the second matrix + multiply the second number in the first row of the first
matrix to the second number in the second row in the second matrix
Adding all the number of the row x column gives the first number of the first row in the resulting
matrix.
For matrices, there is no such thing as division. You can add, subtract, and multiply matrices, but you cannot divide
them. There is a related concept, though, which is called "inversion"
How to write an augmented matrix for a linear system:
The other form where we can write a linear system is through an augmented matrix
The x is in the first column, the y in the second column, and the constants in the last column
How to perform matrix row operations:
We call a matrix with 3 rows and 4 columns a 3x4 matrix – the row is always mentioned first.
1. Switching
2. Multiplication
3. Adding
Switching:
The role of switching is to get a better organized matrix
Multiplication:
When we multiply 1 row with a certain number, we multiply each unit in that row with that number
Addition:
Combining operations:
Common one: multiply by a number and add to another number to form a new one:
Because we combined operations, we can keep the first row the same
Math operations with matrix
Two matrices are equal if all the numbers in the 2 matrix are equal
You can add the same number to all the units in the matrix
Subtraction
To multiply a matrix by another matrix we need to do the "dot product" of rows and columns.
To get the first number of the first row in the resulting matrix:
1(0) + 2(2) = 4
Lastly:
Example:
We have (3×3) × (3×3) and since the number of columns in A is the same as the number of rows in B (the
middle two numbers are both 3 in this case), we can go ahead and multiply these matrices. Our result will
be a (3×3) matrix.
We multiply the individual elements along the first row of matrix A with the corresponding elements down
the first column of matrix B, and add the results. This gives us the number we need to put in the first row,
first column position in the answer matrix.
Following that, we multiply the elements along the first row of matrix A with the corresponding elements
down the second column of matrix B then add the results. This gives us the answer we'll need to put in
the first row, second column of the answer matrix.
Determinant of a matrix:
One of the simplest and most unique operation you can do with a matrix is called the determinant.
Result
Another example:
So,
Start with the first number, then multiply by the 2x2 matrix after you cover up the row and column of that
number
We get
We get
Result
Inverse Matrix
To find the inverse matrix, we must first know about the identity matrix
Identity matrices are all square. They have the same number of rows and columns. Think of them as the
number ‘1’ in the matrix world
Matrices that are multiplied by their matching sized identity matrix produce the original matrix. We label
the Identity matrix with a capital I
An inverse matrix meets the following criteria:
Imagine we can't divide by numbers and someone asks "How do I share 10 apples with 2 people?"
10 × 0.5 = 5
XA = B
It would be nice to divide both sides by A (to get X=B/A), but remember we can't divide.
XAA-1 = BA-1
XI = BA-1
We can remove I (for the same reason we can remove "1" from 1x = ab for numbers):
X = BA-1
Turning the left side into the identity matrix gives the inverse on the right
Example:
Change all the numbers not on the diagonals to 0, and the numbers on the diagonal to 1
First, add second row to the third row to get a new third row:
You have a new third row
Now multiply the new third row by -3 and add it to the top row to get a new top row
Result:
Lastly divide the second row by 2. We get:
Result:
Remember:
A pet shop owner says he has 50 cats and dogs. If he subtracts the number of cats from dogs, he gets
30. How many dogs and cats does he have?
First you create your coefficient matrix, which includes just the coefficients on the left side of the matrix.
We will call the determinant of this matrix D
Then for each variable, you take your coefficient matrix and substitute the constant numbers which are
the numbers on the right side of the equation
Same is done for d. We then find the determinant of these matrices, called Dc and Dd
Solution of c = Dc / D
Solution of d = Dd / D
D=2
Dc = 20
Dd = 80
Answer:
Solving linear systems in three variables using determinants
D = 15
Dx = 15
Dy = 30
Dz = 45
Answer: