(16 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | [[Category:MA265Fall2011Walther]] | |
+ | [[Category:bonus point project]] | ||
+ | [[Category:MA265]] | ||
+ | [[Category:linear algebra]] | ||
+ | [[Category:math]] | ||
+ | <center><font size= 4> | ||
+ | '''Matrix Multiplication and Coordinate Systems''' | ||
+ | </font size> | ||
+ | |||
+ | Student project for [[MA265]] | ||
+ | </center> | ||
+ | ---- | ||
+ | ---- | ||
== 1. Matrix Multiplication == | == 1. Matrix Multiplication == | ||
Line 43: | Line 55: | ||
''For example''<br> | ''For example''<br> | ||
− | + | <math>\left(\begin{array}{cccc}1&2\\3&4\end{array}\right)</math> <math>\left(\begin{array}{cccc}5&6\\7&8\end{array}\right)</math> | |
− | + | ||
− | + | ||
You take a11*b11 + a12*b21 and that's your c11. | You take a11*b11 + a12*b21 and that's your c11. | ||
Line 67: | Line 77: | ||
<br> | <br> | ||
− | So, the new matrix would be | + | So, the new matrix would be <math>\left(\begin{array}{cccc}19&22\\43&50\end{array}\right)</math> |
---- | ---- | ||
Line 73: | Line 83: | ||
<br> '''1.3 Matrix Multiplication in the Real World''' | <br> '''1.3 Matrix Multiplication in the Real World''' | ||
− | <br>Matrix multiplication are used in many life situations. In fact this | + | <br>Matrix multiplication are used in many life situations. In fact this semester I had two classes where matrices where applied. |
To solve for variables and to get probabilities are some of the main functions in the real world. | To solve for variables and to get probabilities are some of the main functions in the real world. | ||
− | When you have equations, and need to solve for the unknown variables, a matrix multiplication and | + | When you have equations, and need to solve for the unknown variables, a matrix multiplication and Rref let you do this. |
<br> | <br> | ||
Line 93: | Line 103: | ||
You can put them in a matrix multiplication like this: <br> | You can put them in a matrix multiplication like this: <br> | ||
− | + | <math>\left(\begin{array}{cccc}12&3\\3&8\\15&1\end{array}\right)</math> <math>\left(\begin{array}{cccc}x\\y\end{array}\right)</math> <math>= \left(\begin{array}{cccc}42\\54\\36\end{array}\right)</math> | |
<br> | <br> | ||
Line 99: | Line 109: | ||
You can verify that the equations and the matrix are equal by doing the dot product. | You can verify that the equations and the matrix are equal by doing the dot product. | ||
− | After doing the | + | After doing the Rref: <math>\left(\begin{array}{cccc}1&0&2\\0&1&6\\0&0&0\end{array}\right)</math> |
+ | |||
+ | You get that the variable <u>x= 2 and y = 6 </u>. | ||
---- | ---- | ||
Line 105: | Line 117: | ||
<br> '''1.4 Matrix Multiplication Related to Other Classes.''' | <br> '''1.4 Matrix Multiplication Related to Other Classes.''' | ||
− | I have known matrices for 1 year, and used them in four classes already. Matrices as told before work for many reasons and areas. Linear Algebra, Differential Equation, | + | I have known matrices for 1 year, and used them in four classes already. Matrices as told before work for many reasons and areas. Linear Algebra, Differential Equation, Stochastic Models, and Operational Investigation I. In many companies they use the matrix multiplication to get to how many output to produce, or how many employees to have. In Stochastic Models the main reason of matrices where probabilities, where with a Markov Chain, you get the probability of going from one step to another. |
<br> | <br> | ||
− | For example | + | ''For example'' |
In a discrete Markov Chain of 3 steps, you have the probability of 40% to staying from step 1 to step 1, 20% from going from step 1 to step 2, and 40% of going from step 3. | In a discrete Markov Chain of 3 steps, you have the probability of 40% to staying from step 1 to step 1, 20% from going from step 1 to step 2, and 40% of going from step 3. | ||
Line 119: | Line 131: | ||
Where you get the matrix: | Where you get the matrix: | ||
− | P= \left(\begin{array}{cccc} | + | <math>P =\left(\begin{array}{cccc}.4&.2&.4\\.2&.3&.5\\.6&.2&.2\end{array}\right)</math> |
<br> | <br> | ||
− | + | ''Exercise:'' | |
If they ask you, initially (k) it is in step 1, how many times on average does step 3 would be visit in (k+3)? | If they ask you, initially (k) it is in step 1, how many times on average does step 3 would be visit in (k+3)? | ||
Line 129: | Line 141: | ||
So, you need to add the entry p13 + (p13)^2 + (p13)^3. In other words, the average number of visits in k+1 would be p13, then you <u>MULTIPLY</u> the matrix times the same matrix and add the same entry. Again the same step but for k+3, where you take the matrix to the third.<u></u> | So, you need to add the entry p13 + (p13)^2 + (p13)^3. In other words, the average number of visits in k+1 would be p13, then you <u>MULTIPLY</u> the matrix times the same matrix and add the same entry. Again the same step but for k+3, where you take the matrix to the third.<u></u> | ||
− | <br> | + | <br> <math>P^2 =\left(\begin{array}{cccc}.44&.22&.34\\.44&.23&.33\\.4&.22&.38\end{array}\right)</math> <math>P^3 =\left(\begin{array}{cccc}.424&.222&.354\\.42&.223&.357\\.432&.222&.346\end{array}\right)</math> |
+ | |||
+ | ''Solution:'' | ||
+ | |||
+ | P13 + (P13)^2 + (P13)^3 = (.4) + (.34) + (.354) = <u>1.094 visits on average to state 3.</u> | ||
− | + | *(P13 means entry in row 1, column 3 from P) | |
<br> | <br> | ||
Line 137: | Line 153: | ||
---- | ---- | ||
− | <br> '''1.5 | + | <br> '''1.5 World Cup Problem''' |
− | <br> The following operation is equal to the amount of | + | <br> The following operation is equal to the amount of championships by Germany and Uruguay. Germany will be variable "x", and Uruguay will be variable "y". |
− | Matrix Equation: | + | ''Matrix Equation:'' |
− | + | <math>\left(\begin{array}{cccc}2&3\\6&8\end{array}\right)</math> <math>\left(\begin{array}{cccc}x\\y\end{array}\right)</math> <math> = \left(\begin{array}{cccc}12\\34\end{array}\right)</math> | |
You do the dot product and you get that: | You do the dot product and you get that: | ||
Line 153: | Line 169: | ||
*Solving for this equation, you get that Germany has 3 World Championships and Uruguay just 2. | *Solving for this equation, you get that Germany has 3 World Championships and Uruguay just 2. | ||
− | This is an easy example, but is just one of many problems that can be done with matrices | + | This is an easy example, but is just one of many problems that can be done with matrices multiplication's.<br><br> |
---- | ---- | ||
Line 159: | Line 175: | ||
<br> '''1.6 How I see It'''<br> | <br> '''1.6 How I see It'''<br> | ||
− | I see matrix multiplication as something new in my life but that has a very positive use. Is not material that a middle school student knows, is something extra. But, at the same time is not that difficult. The process of solving | + | I see matrix multiplication as something new in my life but that has a very positive use. Is not material that a middle school student knows, is something extra. But, at the same time is not that difficult. The process of solving these multiplications is with the same tools you have worked since a nine years old: multiplication, addition, subtraction, etc. Don't be scared because it is a matrix operation, just step by step, get going through the problem and you should not have a problem. The only problem is to know what to do next, and what to avoid. Because there are some properties to follow in matrix multiplication, where in 1.7 would be mentioned. |
---- | ---- | ||
Line 165: | Line 181: | ||
'''1.7 Properties''' | '''1.7 Properties''' | ||
+ | <br> a) ''The first property is that it is associative:'' | ||
− | + | <u>A(BC) = (AB)C</u> | |
− | + | <br> | |
+ | b) ''The second property that it is distributive over matrix addition:'' | ||
+ | <u>(A+B)C = AC + BC ....... A(B+C) = AB + AC</u> | ||
− | + | <br> | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | c) The third one is that it is compatible with scalar multiplication: | + | c) ''The third one is that it is compatible with scalar multiplication:'' |
− | c(AB) = (cA)B = A(cB)<br><br> | + | <u>c(AB) = (cA)B = A(cB)</u><br><br> |
---- | ---- | ||
Line 194: | Line 209: | ||
'''2.1 A brief Intro''' | '''2.1 A brief Intro''' | ||
− | A coordinate system is used to determine where a point or a vector is in the space. The direction and magnitude can be also | + | A coordinate system is used to determine where a point or a vector is in the space. The direction and magnitude can be also being shown. There are different types of dimensions, where R2 is the "x" and "y" axis, the most common one. The R3 is three dimensional, where is better known for "x", "y", and "z" axis. There are R4, R5, and so on, but the basic ones are the first two. Coordinate systems are thought in school at a early age, but each time, it gets harder. First you need to just choose points in the graph, and each time it gets more complex. In linear algebra, we use coordinate systems to talk about vectors. Vectors form matrices, so everything is related so far. With this vectors you should be able to understand what a basis, a span, and a subspace really are. |
---- | ---- | ||
Line 200: | Line 215: | ||
<br> '''2.2 Uses in Life''' | <br> '''2.2 Uses in Life''' | ||
− | The coordinate systems | + | The coordinate systems give a better representation of the space, and the locations of things. For example, the whole world has coordinates. To have precise locations of some places, experts use this coordinates of the world. The same happens with the universe, where some people called it a spherical coordinate system, where everything that exists is covered. Another use of real life vectors would be constructions, where you need to add the forces, and get the best design possible so that the building does not have problems in the future. But as this previous examples, also there are many more. If an airplane wants to land with out a problem, they should know the wind velocity and direction, as well the direction and velocity of the plane of course. |
---- | ---- | ||
− | <br> '''2.3 Related to Other | + | <br> '''2.3 Related to Other Classes''' |
+ | |||
+ | In many classes with have seen coordinate systems, but related to matrices, this one would be the first one. Most of the classes where coordinate systems where used, where math classes. But also some physics classes use this coordinates. Where the forces, magnitudes and directions need to be found or taken into account. In the classes of mechanics you also use them, because forces are very common. | ||
---- | ---- | ||
− | <br>'''2.4 Fun example''' Imagine you are 5 kilometers to East from the origin, then you | + | <br>'''2.4 Fun example''' Imagine you are 5 kilometers to East from the origin, then you girlfriend/boyfriend is 8 kilometers to the North from the origin, and 3 kilometers to the West. How far is you girlfriend from you? |
− | First you should need to graph the vectors, where the first one would be from (0,0) to (5,0). The second one should be from (0,0) to (-3,8). So you need to find the | + | First you should need to graph the vectors, where the first one would be from (0,0) to (5,0). The second one should be from (0,0) to (-3,8). So you need to find the magnitude of the resultant vector. |
Where it would be: | Where it would be: | ||
The square root of ((5-(-3))^2 + (0-8)^2) | The square root of ((5-(-3))^2 + (0-8)^2) | ||
− | |||
− | |||
> Square root of (8^2)+(-8)^2 | > Square root of (8^2)+(-8)^2 | ||
− | |||
− | |||
> Square root of 64+64 | > Square root of 64+64 | ||
− | |||
− | |||
> Square root of 128 | > Square root of 128 | ||
+ | |||
+ | > ''<u>You are 11.313 kilometers away from her/him.</u>''''<u></u>''''' | ||
---- | ---- | ||
− | + | '''2.5 How I see it'''<br>When I was a kid a teacher explained to me the coordinate system in a very basic, but easy way. Is just a system that humans created to give locations to stuff. This could be person, places, forces, etc. This includes position and direction. Obviously each time you advance through college you realize is not that easy. It includes lots of uses, and each time more complicated, like dealing with not real numbers. But after all, if you find the logic of it, it can be easier than you think. Imagine just a room, is the universe. Your closet is part of you room and you can have a coordinates just for the closet, but you can also have coordinates for the whole room. Or your floor, if you just count you floor, it would be a plane. But each time you involve more stuff, the space gets bigger. | |
+ | |||
+ | This is the same with the universe, each times gets smaller: Universe --- Earth --- United States ---- Indiana ---- Purdue ---- Classroom ---- Floor. | ||
+ | At the end, it doesn't matter at what coordinates you are in, but always have a smile in your face. | ||
---- | ---- | ||
+ | [[2011_Fall_MA_265_Walther|Back to MA265 Fall 2011 Prof. Walther]] | ||
− | + | [[Category:MA265Fall2011Walther]] | |
+ | [[Category:MA265]] | ||
+ | [[Category:linear algebra]] |
Latest revision as of 09:06, 11 April 2013
Matrix Multiplication and Coordinate Systems
Student project for MA265
1. Matrix Multiplication
1.1 Definition
A matrix multiplication is the production of a new matrix from a pair of matrices.
Matrices can only multiply if the number of columns for the first matrix equals the number of rows for the second matrix.
For example
Multiplying AB
A ---> 3x2 matrix (3 is the # of rows, and 2 is the # of columns)
B ---> 2x3 matrix (2 is the # of rows, and 3 is the # of columns)
THEY DO CAN MULTIPLY!
The new matrix will have the rows of the first matrix and the columns of the second matrix.
For example
AB = C
A ---> "m x p"
B ---> "p x n"
Then C will be "m x n"
1.2 Dot Product
$ A= \left(\begin{array}{cccc}a1\\a2\\.\\.\\.\\an\end{array}\right) $ $ B= \left(\begin{array}{cccc}b1\\b2\\.\\.\\.\\bn\end{array}\right) $
A*B = a1b1 + a2b2 + ... + anbn
In order to make a matrix multiplication, there should be the operation of dot product between the rows of the first matrix and the columns of the second matrix. To fin the entry (a,b) in the new matrix, the sum of the products of the bth column in the second matrix and of the ath row in the first matrix.
For example
$ \left(\begin{array}{cccc}1&2\\3&4\end{array}\right) $ $ \left(\begin{array}{cccc}5&6\\7&8\end{array}\right) $
You take a11*b11 + a12*b21 and that's your c11.
(1)*(5) + (2)*(7) = 19
Then a11*b12 + a12*b22 = c12
(1)*(6) + (2)*(8) = 22
After no more columns, you move to the next row. Take a21*b11 + a22*b21 = c21
(3)*(5) + (4)*(7) = 43
And the last one in this case would be a21*b12 + a22*b22 = c22
(3)*(6) + (4)*(8) = 50
So, the new matrix would be $ \left(\begin{array}{cccc}19&22\\43&50\end{array}\right) $
1.3 Matrix Multiplication in the Real World
Matrix multiplication are used in many life situations. In fact this semester I had two classes where matrices where applied.
To solve for variables and to get probabilities are some of the main functions in the real world.
When you have equations, and need to solve for the unknown variables, a matrix multiplication and Rref let you do this.
For example
Equation 1 -------> 12x + 3y = 42
Equation 2 -------> 3x + 8y = 54
Equation 3 -------> 15x + y = 36
You can put them in a matrix multiplication like this:
$ \left(\begin{array}{cccc}12&3\\3&8\\15&1\end{array}\right) $ $ \left(\begin{array}{cccc}x\\y\end{array}\right) $ $ = \left(\begin{array}{cccc}42\\54\\36\end{array}\right) $
You can verify that the equations and the matrix are equal by doing the dot product.
After doing the Rref: $ \left(\begin{array}{cccc}1&0&2\\0&1&6\\0&0&0\end{array}\right) $
You get that the variable x= 2 and y = 6 .
1.4 Matrix Multiplication Related to Other Classes.
I have known matrices for 1 year, and used them in four classes already. Matrices as told before work for many reasons and areas. Linear Algebra, Differential Equation, Stochastic Models, and Operational Investigation I. In many companies they use the matrix multiplication to get to how many output to produce, or how many employees to have. In Stochastic Models the main reason of matrices where probabilities, where with a Markov Chain, you get the probability of going from one step to another.
For example
In a discrete Markov Chain of 3 steps, you have the probability of 40% to staying from step 1 to step 1, 20% from going from step 1 to step 2, and 40% of going from step 3.
Then from step 2 to step 1, it has 20%. From step 2 to stay in step 2, it has 30%. To go from step 2 to step 3 it has 50%.
Finally from step 3 to step 1, 60%, from step 3 to step 2 just 20%, and from step 3 to stay in step 3, 20%.
Where you get the matrix:
$ P =\left(\begin{array}{cccc}.4&.2&.4\\.2&.3&.5\\.6&.2&.2\end{array}\right) $
Exercise:
If they ask you, initially (k) it is in step 1, how many times on average does step 3 would be visit in (k+3)?
So, you need to add the entry p13 + (p13)^2 + (p13)^3. In other words, the average number of visits in k+1 would be p13, then you MULTIPLY the matrix times the same matrix and add the same entry. Again the same step but for k+3, where you take the matrix to the third.
$ P^2 =\left(\begin{array}{cccc}.44&.22&.34\\.44&.23&.33\\.4&.22&.38\end{array}\right) $ $ P^3 =\left(\begin{array}{cccc}.424&.222&.354\\.42&.223&.357\\.432&.222&.346\end{array}\right) $
Solution:
P13 + (P13)^2 + (P13)^3 = (.4) + (.34) + (.354) = 1.094 visits on average to state 3.
- (P13 means entry in row 1, column 3 from P)
1.5 World Cup Problem
The following operation is equal to the amount of championships by Germany and Uruguay. Germany will be variable "x", and Uruguay will be variable "y".
Matrix Equation:
$ \left(\begin{array}{cccc}2&3\\6&8\end{array}\right) $ $ \left(\begin{array}{cccc}x\\y\end{array}\right) $ $ = \left(\begin{array}{cccc}12\\34\end{array}\right) $
You do the dot product and you get that:
2x + 3y = 12
6x + 8y = 34
- Solving for this equation, you get that Germany has 3 World Championships and Uruguay just 2.
This is an easy example, but is just one of many problems that can be done with matrices multiplication's.
1.6 How I see It
I see matrix multiplication as something new in my life but that has a very positive use. Is not material that a middle school student knows, is something extra. But, at the same time is not that difficult. The process of solving these multiplications is with the same tools you have worked since a nine years old: multiplication, addition, subtraction, etc. Don't be scared because it is a matrix operation, just step by step, get going through the problem and you should not have a problem. The only problem is to know what to do next, and what to avoid. Because there are some properties to follow in matrix multiplication, where in 1.7 would be mentioned.
1.7 Properties
a) The first property is that it is associative:
A(BC) = (AB)C
b) The second property that it is distributive over matrix addition:
(A+B)C = AC + BC ....... A(B+C) = AB + AC
c) The third one is that it is compatible with scalar multiplication:
c(AB) = (cA)B = A(cB)
2. Coordinate System
2.1 A brief Intro
A coordinate system is used to determine where a point or a vector is in the space. The direction and magnitude can be also being shown. There are different types of dimensions, where R2 is the "x" and "y" axis, the most common one. The R3 is three dimensional, where is better known for "x", "y", and "z" axis. There are R4, R5, and so on, but the basic ones are the first two. Coordinate systems are thought in school at a early age, but each time, it gets harder. First you need to just choose points in the graph, and each time it gets more complex. In linear algebra, we use coordinate systems to talk about vectors. Vectors form matrices, so everything is related so far. With this vectors you should be able to understand what a basis, a span, and a subspace really are.
2.2 Uses in Life
The coordinate systems give a better representation of the space, and the locations of things. For example, the whole world has coordinates. To have precise locations of some places, experts use this coordinates of the world. The same happens with the universe, where some people called it a spherical coordinate system, where everything that exists is covered. Another use of real life vectors would be constructions, where you need to add the forces, and get the best design possible so that the building does not have problems in the future. But as this previous examples, also there are many more. If an airplane wants to land with out a problem, they should know the wind velocity and direction, as well the direction and velocity of the plane of course.
2.3 Related to Other Classes
In many classes with have seen coordinate systems, but related to matrices, this one would be the first one. Most of the classes where coordinate systems where used, where math classes. But also some physics classes use this coordinates. Where the forces, magnitudes and directions need to be found or taken into account. In the classes of mechanics you also use them, because forces are very common.
2.4 Fun example Imagine you are 5 kilometers to East from the origin, then you girlfriend/boyfriend is 8 kilometers to the North from the origin, and 3 kilometers to the West. How far is you girlfriend from you?
First you should need to graph the vectors, where the first one would be from (0,0) to (5,0). The second one should be from (0,0) to (-3,8). So you need to find the magnitude of the resultant vector.
Where it would be:
The square root of ((5-(-3))^2 + (0-8)^2)
> Square root of (8^2)+(-8)^2
> Square root of 64+64
> Square root of 128
> You are 11.313 kilometers away from her/him.'
2.5 How I see it
When I was a kid a teacher explained to me the coordinate system in a very basic, but easy way. Is just a system that humans created to give locations to stuff. This could be person, places, forces, etc. This includes position and direction. Obviously each time you advance through college you realize is not that easy. It includes lots of uses, and each time more complicated, like dealing with not real numbers. But after all, if you find the logic of it, it can be easier than you think. Imagine just a room, is the universe. Your closet is part of you room and you can have a coordinates just for the closet, but you can also have coordinates for the whole room. Or your floor, if you just count you floor, it would be a plane. But each time you involve more stuff, the space gets bigger.
This is the same with the universe, each times gets smaller: Universe --- Earth --- United States ---- Indiana ---- Purdue ---- Classroom ---- Floor.
At the end, it doesn't matter at what coordinates you are in, but always have a smile in your face.