# Matrices provide a compact notation for expressing systems of equations or variables. For instance, a linear function might be written as: b k

Save this PDF as:

Size: px
Start display at page:

Download "Matrices provide a compact notation for expressing systems of equations or variables. For instance, a linear function might be written as: b k"

## Transcription

1 MATRIX ALGEBRA FOR STATISTICS: PART 1 Matrices provide a compact notation for expressing systems of equations or variables. For instance, a linear function might be written as: y = x 1 b 1 + x 2 + x 3 b x k b k This is really the product of a bunch of b variables and a bunch of x variables. A vector is simply a collection of variables (in a particular order). We could define a (kdimensional) vector x = (x 1, x 2,, x n ), and another vector b = (b 1,,,b n ). Again, these vectors simply represent the collections of x and a variables; the dimension of the vector is the number of elements in it. We define the product of two vectors to be: k x b " x i b i = x 1 b 1 + x x k b k i=1 (Specifically, this is called a dot product or inner product; there exist other ways to calculate products, but we won t be using those.) If you think of b as the collection of all b variables and x as the collection of all x variables, then the product x b is the product of each b variable with the corresponding x variable. You can calculate the (dot) product only when the two vectors have the same dimension. Example: Let a = (1,2,3,4) and let b = (5,6,7,8). These are both 4-dimensional vectors, 4 so we can calculate their dot product. a b = " i=1 a i b i = (1 5) + (2 6) + (3 7) + (4 8) = = 70. Sometimes, we say that two vectors are orthogonal if their dot product equals zero. Orthogonality has two interpretations. Graphically, it means that the vectors are perpendicular. On a deeper philosophical level, it means that the vectors are unrelated. Example: Let c = (0,1) and let d = (1,0). Since c d = (0 1) + (1 0) = = 0, the vectors are orthogonal. Graphically, we can represent c as a line from the origin to the point (0,1) and d as a line from the origin to (1,0). These lines are perpendicular. (On a deeper sense, they are unrelated because the first vector moves only along the x-axis and never changes its y-direction; the second moves only along the y-axis and doesn t change its x-direction.) Example: Let e = (1,1) and let f = (1,1). Since e f = (11) + (1 "1) = 1+ ("1) = 0, the vectors are orthogonal. Again, we can show that these lines are perpendicular in a graph. (It s a bit hard to graph how they are unrelated; but we could create a new coordinate system for the space in which they are.) There s a moral to this exercise: two vectors can have a product of zero, even though neither of the vectors is zero. Matrix algebra primer, page 1

2 Finally, dot products have a statistical interpretation. Let s let x and y be two random variables, each with mean zero. We will collect a sample of size N, and we will record the value of x i and y i for each observation. We can then construct a vector x = (x 1, x 2,, x N ) and a similar vector y = (y 1, y 2,, y N ). When we take their dot product, we calculate: x y = " N i=1 x i y i = (N 1) Côv(x, y) The dot product is essentially their (empirical) covariance. Saying that the vectors x and y are orthogonal is exactly the same as saying that the variables x and y are uncorrelated. Similarly, the dot product of a vector with itself is: x x = " N i=1 x 2 i = (N 1) Vâr(x) Here s an unnecessary bit of trivia: if we graph two vectors in N-dimensional space, the angle between them must always satisfy: cos = x " x x " y y " y In the case of these random variables, cos = x " y x " x y " y = (N 1)Côv(x, y) = Côrr(x, y) (N 1)Vâr(x) (N 1)Vâr(y) The correlation coefficient is the cosine of the angle between the vectors (Remember that the cosine of two rays is one if they point in exactly the same direction, zero if they are perpendicular, negative one if they point in exactly opposite directions exactly the same as with correlations.) Coincidence? Not really, on a very deep level, but we don t have to go there. Now let s move on to matrices. As it turns out, vectors are just special cases of matrices, so there s not much point in discussing them specifically. We used vectors to express a single linear equation, and we will use matrices to present a system of linear equations, like: y 1 = x 11 b 1 + x 12 + x 13 b x 1k b k y 2 = x 21 b 1 + x 22 + x 23 b x 2k b k y 3 = x 31 b 1 + x 32 + x 33 b x 3k b k y n = x n1 b 1 + x n2 + x n3 b x nk b k Matrix algebra primer, page 2

3 (The subscripts above are two separate numbers. The first line would be read y-one equals x-one-one times a-one plus x-one-two. A careful person might separate the indices with a comma, to make it clear that x 1,1 is not x-eleven.) Instead of this complicated system of equations, we can represent the vector y = (y 1, y 2,, y n ) as the product of an n k matrix X with the vector b = (b 1,,,b k ). A matrix A is defined as a collection of n k entries arranged into n rows and k columns. The entry in the i-th row and j-th column is denoted by a ij : a 11 a 12 a 1k a 21 a 22 a 2k A = " " " " a n1 a n2 a nk n k The elements of a matrix are scalars. A scalar is a real number (or a function that takes on a specific value). Tacking a set of dimensions onto the bottom right-hand corner of the matrix always makes it easier to remember the dimensions of that matrix. This is strictly optional. The dimensions are always expressed as rows x columns. An n k matrix is different from an k n matrix. Incidentally, a vector is just a special kind of matrix: it is a matrix with a single column. An n-dimensional vector is nothing more or less than an n 1 matrix. A spreadsheet containing data is a common example of a matrix. I might have an Excel file with my students grades: Student Exam 1 Exam 2 Exam 3 Ann Bob Carl Doris Pat Essentially, I have a 5 3 matrix of grades, G = " Matrix algebra primer, page 3

4 This is how we usually use matrices in econometrics: to express a collection of data. We will be applying the same formula to each observation in our empirical model (much as I would apply the same formula to calculate the final grade of each student). However, let s just leave this example matrix for now, and study basic matrix operations. Given an n k matrix A with the entries described as above, the transpose of A is the k n matrix A (sometimes written as A T ) that results from interchanging the columns and rows of A. That is, the i-th column of A becomes the i th row of A ; the j-th row of A becomes the j-th column of A : a 11 a 12 a 1k a 21 a 22 a 2k A = " " " " a n1 a n2 a nk n k a 11 a 21 a n1 a 12 a 22 a n2 ( A ) = " " " " a 1k a 2k a nk k n Think of this like flipping the matrix on its diagonal. Example: With the matrix of grades above, G = " G = " Addition of matrices is fairly straightforward, defined in this manner. Given two matrices A and B that have the same dimension n k, their sum A + B is also an n k matrix, which we obtain by adding elements in the corresponding positions: a 11 + b 11 a 12 + b 12 a 1k + b 1k a a a 2k + b 2k A + B = " " " " a n1 + b n1 a n2 + b n2 a nk + b nk Not all matrices can be added; their dimensions must be exactly the same. As with addition of scalars (that is, addition as you know it), matrix addition is both commutative and associative; that is, if A and B and C are matrices of the same dimension, then A + B n k ( ) + C = A + ( B + C) and A + B = B + A. Example: Let D and E be the matrices below: Matrix algebra primer, page 4

5 D = 3 4, E = 1 1 " 6 7 " 0 1 Then their sum is the matrix: D + E = = = 4 5, " 6 7 " 0 1 " " 6 8 Again, matrix addition probably feels very natural. Matrix subtraction is the same. There are two types of multiplication used with matrices, and the first should also feel natural. This is called scalar multiplication: when we multiply an entire matrix by a constant value. If is some scalar (just a single number), and B is an n k matrix, then B is computed by multiplying each component of B by the constant : b 11 b 12 b 1k 1 2 b 2k B = " " " " b n1 b n2 b nk n k )b 11 )b 12 )b 1k )1 )2 )b 2k ( )B = " " " ")b n1 )b n2 )b nk n k Scalar multiplication has all the familiar properties: it is distributive, commutative, and associative. That is, ( A + B) = A + B, ( + ")A = (" + )A, ("A) = (")A, and (" + )A = "A + A. Example: Use the matrix D from the previous example. Then 4D is the matrix: " " D = = Multiplying one matrix by another matrix is more complicated. Matrix multiplication is only defined between an n k matrix A and an k m matrix B, and the order matters. The number of columns in the first must equal the number of rows in the second. Their product is the n m matrix C, where the ij-th element is defined as: c ij = a i1 b 1 j + a i2 j + + a ik b kj + + a in b nj In other words, we take get c ij by taking the dot product of the i-th row of A and the j-th column of B: Matrix algebra primer, page 5

6 a 11 a 1" a 1k a i1 a i" a ik " a m1 a n" a nk n k b 11 b p1 " b k1 b 1j b pj b kj b 1m b pm b km k m c 11 c 1 j c 1m = c i1 c ij c im " c n1 c nj c nm n m Notice that multiplying a row of A by a column of B is unlikely to give you the same answer as multiplying a column of A by a row of B. Matrix multiplication is not commutative: AB BA (except by coincidence, or when both are diagonal matrices of the same dimension). It is very, very important to keep the order right. Here are two other rules to know about matrix multiplication: AB = 0 / ( A = 0 or B = 0) and: AB = AC / B = C except in special cases. Fortunately, matrix multiplication is still associative and distributive. That is, A( BC) = ( AB)C and A( B + C) = AB + BC. This makes multiplication a bit easier. Because I find it really hard to remember which column gets multiplied by which row and ends up where, I use this trick to keep everything straight when multiplying matrices. I align the two matrices A and B so that the second one is above and to the right of the first. For each row i of A I trace a line out to the right, and each column j of B a line going down, and where these intersect is where their product lies in the matrix C. This is like a coordinate system for the c ij. a 11 a 1k a 1n " " " a i1 a ik a in " " " " a m1 a mk a mn b 1j " b 1p " b 11 " b k1 b kj b kp " " " " b n1 b nj b np c 11 c 1 j c 1p " " " c i1 c ij c ip " " " " c m1 c mj c mp I also find this trick very useful for multiplying a bunch of matrices. If we have find the product ABD of three matrices, Once I find C = AB as above, all I have to do is stick the matrix D immediately to the right of B, and I have my coordinate system for the product of C and D. Matrix algebra primer, page 6

7 Example: Let F by a 2 2 matrix, and let G be a 2 2 matrix, defined below: F = 1 2 " 3 4, G = " Then the product FG is the 2 2 matrix: FG = (1 1( 2 0 (1+ 2 ( 2 " 3 4 "1 2 = " 1( 3 1( 4 0 ( ( 4 = " = 1 2 "3 8 Example: Let C by a 2 3 matrix, and let D be a 3 2 matrix, defined below: C = " 0 3 1, D = 3 4 " 6 7 Then the product CD is the 2 2 matrix: CD = " 1 2 " " 1(1+ 2 ( ( 6 1( ( ( 7 = 0 (1+ 3( 3 1( 6 0 ( 2 + 3( 4 1( " = = " Now let s talk about some names for special types of matrices. A square matrix is one that has the same number of rows as columns; that is, an n n matrix. A diagonal matrix is a square matrix that has the entry a ij = 0 for alli j (in other words, zero everywhere except for the diagonal). For example, " A = is a diagonal matrix. A symmetric matrix is one that is the same as its transpose, A = A. Idempotent matrices ares one that are the same when multiplied by themselves, A 2 = AA = A. The n n identity matrix (denoted by I or I n ) is a diagonal matrix with ones on the diagonal (and zeros everywhere else): Matrix algebra primer, page 7

8 I n = " " " This has the property that for any n k matrix A, the product AI k equals A. In matrix multiplication, it is the analogue of the number one in simple multiplication. (In fact, you could take the position that simple multiplication is just matrix multiplication using 1 1 matrices; the 1 1 identity matrix is just [1].) We will use the identity matrix to define the matrix equivalent of division. However, we never divide matrices; we always multiply by the inverse. With normal numbers, the inverse of a is defined as the number a 1 such that a a "1 = 1 = a "1 a. Most square matrices (but not all) are invertible, and given an n n matrix A, its inverse is the matrix A 1 with the property that: AA 1 = I n = A 1 A Computing inverses of matrices is a major pain in the ass most of the time. Fortunately, we usually only do this in theory; we let Stata calculate it for us the rest of the time. However, you should know that the inverse is not obtained by inverting each individual component of the matrix. Counterexample and Example: Let F by a 2 2 matrix, and let H be a 2 2 matrix, defined below: F = 1 2 " 3 4, H = 1 /1 1 / 2 " 1 / 3 1 / 4 H is not the inverse of F, since the product is not the identity matrix: FH = /1 1 / 2 " 3 4 " 1 / 3 1 / 4 = 1 /1+ 2 / 3 1 / / 4 " 3 /1+ 4 / 3 3 / / 4 = 5 / 3 4 / 4 " 13 / 3 10 / " 0 1 If we want to compute the inverse of F, it is some 2 2 matrix of the form: " F 1 = w y x z where we will treat w, x, y, and z as unknowns. This matrix F 1 has the property that: Matrix algebra primer, page 8

9 " FF 1 = 1 2 " w 3 4 y x z = " 1( w + 2 ( y 1( x + 2 ( z 3( w + 4 ( y 3( x + 4 ( z = " This gives us a system of four equations in four unknowns: 1 w + 2 y = 1 1 x + 2 z = 0 3 w + 4 y = 0 3 x + 4 z = 1 We can solve this by iterated substitution. The second equation tells us that x = 2 " z. We can plug this into the last equation and get 3("2z) + 4z = 1, so 2z = 1, and z = 1 2. This means that x = 2z = 2(1 2) = 1. Next, we observe from the third equation that y = 3 4 w. Plugging this into the first equation, we have 1w + 2(3 4 w) = 1, so w 3 2w = 1, 1 2w = 1, so w = 2. This means that y = 3 2. Putting this altogether, the inverse of F must be: " F 1 = We can verify this by taking the product, " FF 1 = 1 2 " 2 1 " 1((2) + 2 ((3 2) 1(1+ 2(1 2) = 3((2) + 4 ((3 2) 3(1+ 4(1 2) " = = " Again, computing the inverse of a matrix is a pain and the 2 2 case is the easiest that it comes (More generally, with an n n matrix you have n 2 equations in n 2 unknowns, so it rapidly gets complicated.) We generally deal with matrix inverses only in theory, so it s important to know some theoretical properties of inverses. I ll add some rules for transposes as well, since they mirror the others: (A 1 ) 1 = A (AB) 1 = B 1 A 1 ( A ) "1 = (A "1 ) ( A ) = A (AB) = B A (A + B ) = A + B Note that the order of multiplication changes when passing the transpose or inverse through parentheses. Also, the rule (AB) 1 = B 1 A 1 works only when each matrix is a square matrix (otherwise, they don t have individual inverses but their product might be a square matrix, so it might still have an inverse). Matrix algebra primer, page 9

10 As I mentioned before, not all square matrices are invertible. (The same is true of regular numbers: zero has no inverse.) A square matrix that has no inverse is called a singular matrix. Let me give you one example. The 2 2 matrix J = 2 0 " 2 0 is not invertible. If it did have an inverse, it would be some matrix of the form: " J 1 = w y x z with the property that: JJ 1 = I 2 (That s just the definition of an inverse.) That would mean that: 2 0 w " 2 0 " y x 2w + 0y z = " 2w + 0y 2x + 0z 2x + 0z = 1 0 " 0 1 This gives the system of equations: 2w + 0y = 1 2w + 0y = 0 2x + 0z = 0 2x + 0z = 1 This cannot possibly have a solution. Look at the first two equations: they are the same on the left-hand side, but equal zero in the first equation and one in the second. For these to be satisfied, we would have to have 1 = 2w + 0y = 0, so 1 = 0. That s just not possible. J cannot possibly have an inverse, so it is singular. Here are some rules for identifying whether a matrix is singular: 1. If all of the elements in one row (or column) of the matrix are zero, then the matrix has no inverse. 2. If two rows (or two columns) are identical, then the matrix has no inverse. 3. If two rows (or two columns) are proportional, then the matrix has no inverse. 4. If one row (or one column) can be written as a linear function of some other rows (or of some other columns), then the matrix has no inverse. Matrix algebra primer, page 10

11 These essentially exhaust all possibilities. We can use the matrix J as an example of both the first and second cases. The second column of J is all zeros, so this indicates that the matrix has no inverse. It is also the case that the first and second rows are duplicates, so this also tells that the matrix is not invertible. As an example of the third case, look at the matrix: " K = The third row is proportional to the first: you can obtain the third row by multiplying the first by four (1 4 = 4, 2 4 = 8, 3 4 = 12 ). This indicates that this matrix will not have an inverse. Finally, let s look at an example of the fourth case. The matrix: L = " cannot have an inverse, since the third row can be calculated as a linear function of the other two: Third row = First row + 2 (Second row). These rules will be relevant later when we work with data. Now that we have all the basic terminology, let s return to the example with grades. The original system of equations that I presented, y 1 = x 11 b 1 + x 12 + x 13 b x 1k b k y 2 = x 21 b 1 + x 22 + x 23 b x 2k b k y 3 = x 31 b 1 + x 32 + x 33 b x 3k b k y n = x n1 b 1 + x n2 + x n3 b x nk b k Can be expressed easily through matrix multiplication. On the left-hand side, we have a bunch of y variables. It would be easy to construct an n 1 matrix (vector, really) Y = [y 1 y 2 y n ]. On the right hand side, we have a bunch of x variables, and each is multiplied by the same series of b variables. Let s place all of the b variables into a k 1 matrix (vector): b = [b 1 b k ]. Finally, let s arrange the x into a matrix: Matrix algebra primer, page 11

12 x 11 x 12 x 1k x 21 x 22 x 2k X = " " x n1 x n2 x nk Then the expression: Y = Xb means precisely the same thing as the system of equations. It s also much more compact, and I feel that it distills the most important idea: the ys are equal to the xes times the bs. Let s return to the matrix of grades. I have placed all the grades of my students into a 5 3 matrix, Exam Ann1 Exam Ann2 Exam Ann Exam Bob1 Exam Bob2 Exam Bob G = Exam Carl1 Exam Carl 2 Exam Carl 3 = Exam Doris1 Exam Doris2 Exam Doris " Exam Pat1 Exam Pat 2 Exam Pat 3 " The number in the i-th row and j-th column of this matrix represents the score of student i on exam j. I want to calculate the final average of each student using the formula: Average i = 0.3 Exam 1i Exam 2i Exam 3i We could construct a 3 1 vector of weights: 0.3 w = 0.3 " 0.4 Then we compute, A = Gw Since this is the product of a 5 3 matrix and a 3 1 matrix, the product is a 5 1 matrix. It contains a value of Average i for each person, and it is exactly: Matrix algebra primer, page 12

13 Average Ann 0.3 Exam Ann Exam Ann Exam Ann3 Average Bob 0.3 Exam Bob Exam Bob Exam Bob3 A = Average Carl = 0.3 Exam Carl Exam Carl Exam Carl 3 = Gw Average Doris 0.3 Exam Doris Exam Doris Exam Doris3 " Average Pat " 0.3 Exam Pat Exam Pat Exam Pat 3 The matrix form A = Gw is a much more compact way to express this system of equations. You can also use matrices to solve other problems. Suppose that you observed the exam grades for a few students in the class, and you observed their final averages. However, you don t know what weights I used to make these calculations, so you want to infer those from the data. Student Exam 1 Exam 2 Exam 3 Average Edmund Exam Ed1 Exam Ed 2 Exam Ed 3 Average Ed Frances Exam Fran1 Exam Fran2 Exam Fran3 Average Fran George Exam George1 Exam George2 Exam George3 Average George You know that a used a formula of the form: Average i = w 1 Exam i1 + w 2 Exam i2 + w 3 Exam i 3 but you don t know the values of W k. You can create three matrices, A = " Aver Ed Aver Fran Aver George Exam Ed1 Exam Ed 2 Exam Ed 3, G = Exam Fran1 Exam Fran2 Exam Fran3, w = " Exam George1 Exam George2 Exam George3 " The relationship between exam scores and the final average can be summarized as: A = Gw How would you solve for w? This would be simple algebra if we were dealing with normal numbers: divide both sides by G. The only difference is that with matrices, we don t divide; we multiply by the inverse. Since G is a square matrix, an inverse usually exists: G 1 A = G 1 Gw It must be the case that G 1 G = I, the identity matrix. Anything multiplied by the identity matrix is the same thing again, so Iw = w. We have a formula for calculating the weights: w 1 w 2 w 3 Matrix algebra primer, page 13

14 w = G 1 A This formula will always work. And that s essentially what we re always doing in econometrics: trying to guess some weights that are attached to variables in determining some outcome. It s not quite as easy as this example, since the equivalent of the G matrix is not square (and so it can t be inverted), but it s essentially the same thing. Matrix algebra primer, page 14

15 MATRIX ALGEBRA FOR STATISTICS: PART 2 In econometrics and economics, it s common to have a function that depends on a bunch of variables. (For example, your utility depends on your consumption of a number of different goods.) We could write these functions as: y = f (x 1, x 2,, x k ) or we could create an k-dimensional vector x = [x 1, x 2,, x k ] to convey the same idea: y = f (x) Regardless, a function of many variables has a bunch of partial derivatives: f x 1, f x 2,, f x k. It is simply to create a 1 k matrix to contain all of these partial derivatives. We ll call it f x : f x = [f x 1 f x 2 f x k ] This matrix of first derivatives is sometimes called a Jacobian matrix. By convention, we always construct this to be a 1 k matrix, not an k 1. If we wanted it to be arranged the other way, we would write either (f x)" or f x ". It is worth knowing that: (f x)" = f x " Anyhow, when we have a system of equations, y 1 = f 1 (x 1, x 2,, x k ) y 2 = f 2 (x 1, x 2,, x k ) y n = f n (x 1, x 2,, x k ) we can represent this using a vector y = [y 1, y 2,, y n ], another vector x = [x 1, x 2,, x k ], and a vector-valued function f() = [ f 1 (), f 2 (),, f n ()]" : y = f(x) Again, that represents precisely the same thing as the system of equations. When we take the matrix of first derivatives, we write f x to represent: "f 1 x 1 f 1 x 2 f 1 x k f 2 x 1 f 2 x 2 f 2 x k f x = " f n x 1 f n x 2 f n x k Matrix algebra primer, page 15

16 This is an n k matrix. As is often the case with matrices, it might be best to think of this abstractly: this f x is simply a matrix that contains all of the derivatives of each of the f functions with respect to each of the x variables. So now, let s work on taking some derivatives of some matrices. We need to learn only two special cases: linear functions and quadratic functions. Let s start with the simple system: y 1 = 2 x x 2 y 2 = 4 x x 2 In each case, y is a linear function of the x variables. We know that we can write this system of equations in matrix form as: y = Ax where y = [y 1 y 2 ], x = [x 1 x 2 ], and A = 2 3 " 4 5 As a note, all systems of linear equations (regardless of how many ys you have, or how many xes you have) can be written in the form y = Ax for some matrix A. Anyhow, we now want to calculate the matrix of derivatives: y x = " y x 1 1 y 1 x 2 y 2 x 1 y 2 x 2 These partial derivatives are simple, since the functions are linear. y x = " y x 1 1 y 1 x 2 y 2 x 1 y 2 x 2 = " which turns out to be the same as the original matrix A. So here s what you need to remember about taking derivatives of linear functions (along with the analogues in scalar calculus): Type of linear function: Scalar Matrix Always takes the form: y = ax y = Ax Derivative: y x = a y x = A The rule is exactly the same, really. Matrix algebra primer, page 16

17 Next, we ll do quadratic functions. A quadratic function of a single variable generally looks like y = ax 2. With two variables, it takes the form: y = ax bx 1 x 2 + cx 2 2 Of course, we could expand this to contain as many x variables as we like, but two are enough to give it a matrix representation: y = x Ax where x = [x 1 x 2 ], and A = a " b b c. With a quadratic function of a single variable, we write y = ax 2 to denote that it is the product of x, x again, and a constant a. The same thing is true with the matrix representation of a quadratic function of several x variables: it is the product of x, x again, and a constant matrix A. However, the order of the multiplication is important with matrices, so x Ax " Ax 2 (you can t calculate the latter, since x can t be multiplied by x directly). Anyhow, if the function is y = x Ax = ax bx 1 x 2 + cx 2 2, what is y x? y x = " y y x 1 x = 2ax + 2bx 1 2 2bx 1 + 2cx 2 2 [ ] According to scalar multiplication, the last matrix can be written: [ 2ax 1 + 2bx 2 2bx 1 + 2cx 2 ] = 2[ ax 1 + bx 2 bx 1 + cx 2 ] As it turns out, the matrix on the right hand side is simply x A. What you have is that y x = 2 x" A. Again, let me present the rules for quadratic matrices next to the scalar analogues: Type of quadratic function: Scalar Matrix Always takes the form: y = ax 2 y = x Ax Derivative: y x = 2ax y x = 2 x" A And that s all there is to know about taking derivatives when matrices are involved. The last thing on the agenda is to work out a problem, which is the basis of econometrics. We believe that there is some outcome y that is determined (in part) by some variables x 2, x 3,, x k. (As a matter of convention, we start counting with variable number two; I will explain x 1 later.) We have a sample of N observations; Matrix algebra primer, page 17

18 the letter i will denote a generic member of this sample. For each member of the sample, we believe that the relationship can be described: y i = x i2 + 3 x i K x ik + e i e i represents the portion of y i that is determined by variables other than the xes. For example, we might think that a worker s annual earnings (that s the y ) are determined by his education and work experience (those are the xes) among other things (those other factors are lumped together in e). This relationship is the same for everyone the s are all the same. We are assuming that the reason that people have different earnings is because their levels of education and experience (and other factors) differ, although the returns to education and experience are the same for everyone. The problem is that we don t know these returns, so we want to guess them from the data. The relationship holds for each observation in our sample. In other words, y 1 = x x K x 1K + e 1 y 2 = x x K x 2K + e 2 y N = x N x N K x NK + e N We know how to represent this system of equations in compact matrix notation. We can construct a vector y = [y 1 y 2 y N ] N "1 containing all of the y values for our sample. We can construct another vector = [ 1 2 K ]" K 1 containing all of the coefficients. There is a little trick in constructing the matrix X : it will contain all the variables x 2, x 3,, x k for all the people; in addition, we will have x 1 = 1 for everyone. 1 x 12 x 13 x 1K 1 x 22 x 23 x 2K X = " " " 1 x N 2 x N 3 x NK N K Finally, we can construct a vector e = [e 1 e 2 e N ] N "1 containing all of the unobservable determinants of the outcome y. The system of equations can be represented as: y N 1 = X N K " K 1 + e N 1 I ve added subscripts to the matrices to ensure that all the operations (multiplication and addition) conform. An N K matrix can be multiplied by a K 1 vector; the product X is then an N 1. This can be added to the N 1 vector e; the sum y should also be N 1. Everything checks out. Matrix algebra primer, page 18

19 This equation describes the true relationship between x and y. However, we don t know this true relationship. We will make some guess as to the value of the coefficients. Let us denote an (arbitrary) guess as ˆ. Now we will write the econometric model as: y N 1 = X N K ˆ"K 1 + ê N 1 The last term, ê, is called the residual vector. It is the portion of the outcome that we the econometricians cannot explain. e is the portion of the outcome that in truth cannot be explained, but we don t know what this is (it is unobservable, after all). We do know ê, however. Once we pick ˆ, ê is defined as: ê N 1 = y N 1 " X N K ˆK 1 The true relationship and the econometric model are analogues. is the true vector of coefficients; ˆ is our guess of the vector of coefficients. e is the true effect of other factors not in the model; ê is our guess of the effect of other factors. Therefore, if we have guessed ˆ exactly right, then we have guessed ê exactly right; if we get ˆ close to the true value, then our ê are close to the true values. What we would like to do is to come up with a guess ˆ that minimizes the unexplained portion; that is, we want to pick ˆ to minimize the size of the vector ê. The size (or norm) of the vector ê is defined as: ê = ê ê ê 2 N = eˆ ê We can forget about the square root, though, since it doesn t change the solution to the minimization problem. The bottom line is that we want to pick ˆ to min ê ê 2 2 ( ê N ) = min N i=1 ê 2 i = min eˆ" ê The rest is algebra. First, we ll simplify the expression eˆ ê ; then we ll minimize it; finally, we ll solve that for the optimal ˆ, which we ll call ˆ OLS : the ordinary least squares estimator of. We want to minimize the following expression: min eˆ ê = min(y " X ˆ )(y " X ˆ) Let s transpose the first matrix: min eˆ ê = min( y " ˆ X )(y " X ˆ) Now let s multiply through: min eˆ ê = min( y y " y X ˆ " ˆ X y + ˆ X X ˆ) Matrix algebra primer, page 19

20 To minimize the problem, we take the derivative with respect to ˆ, and set that equal to zero (or really, a vector of zeros). The optimal ˆ OLS must solve: y" X ( X" y )" + 2 ˆ" OLS X" X = 0 Now let s simplify and solve for ˆ OLS. Transposing the second term, we have: y" X y" X + 2 ˆ" OLS X" X = 0 We can group the first two terms together, and then move them to the right-hand side of the equation: 2" ˆ OLS X X = 2 y X Then we can cancel out the 2 s. We want to solve for ˆ, but this expression contains " ˆ instead. We can easily solve this problem by transposing everything on both sides of the equation: (ˆ " OLS X X ) = ( y X ) X X ˆ" OLS = X y Finally, we need to isolate ˆ. If we were working with scalars, we would divide both sides by the stuff in front of ˆ ; since these are matrices, we multiply by the inverse instead (provided that X X is in fact invertible, which we will assume for now). ( X X) "1 ( X X ˆ OLS ) = ( X X) "1 ( X y) Finally, ( X X) "1 ( X X) = I, the identity matrix; I ˆ OLS = ˆ OLS. We have our formula for the estimator: ˆ OLS = ( X" X) 1 ( X" y) That s it. Remember how in the univariate regression model, ˆ 2OLS = Côv(x, y) Vâr(x)? Here we have essentially the same thing, except that it s greatly generalized However, it isn t that simple in reality. X X is actually a very complex matrix, which contains all of the variances and covariances between the x variables. Its inverse is not simply the reciprocal of these terms; it is something much more complex. Nonetheless, in an abstract sense, it is exactly the same. Matrix algebra primer, page 20

### The basic unit in matrix algebra is a matrix, generally expressed as: a 11 a 12. a 13 A = a 21 a 22 a 23

(copyright by Scott M Lynch, February 2003) Brief Matrix Algebra Review (Soc 504) Matrix algebra is a form of mathematics that allows compact notation for, and mathematical manipulation of, high-dimensional

### Linear Algebra Notes for Marsden and Tromba Vector Calculus

Linear Algebra Notes for Marsden and Tromba Vector Calculus n-dimensional Euclidean Space and Matrices Definition of n space As was learned in Math b, a point in Euclidean three space can be thought of

### 1 Introduction to Matrices

1 Introduction to Matrices In this section, important definitions and results from matrix algebra that are useful in regression analysis are introduced. While all statements below regarding the columns

### Solution to Homework 2

Solution to Homework 2 Olena Bormashenko September 23, 2011 Section 1.4: 1(a)(b)(i)(k), 4, 5, 14; Section 1.5: 1(a)(b)(c)(d)(e)(n), 2(a)(c), 13, 16, 17, 18, 27 Section 1.4 1. Compute the following, if

### Lecture 2 Matrix Operations

Lecture 2 Matrix Operations transpose, sum & difference, scalar multiplication matrix multiplication, matrix-vector product matrix inverse 2 1 Matrix transpose transpose of m n matrix A, denoted A T or

### MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS 1. SYSTEMS OF EQUATIONS AND MATRICES 1.1. Representation of a linear system. The general system of m equations in n unknowns can be written a 11 x 1 + a 12 x 2 +

### December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B KITCHENS The equation 1 Lines in two-dimensional space (1) 2x y = 3 describes a line in two-dimensional space The coefficients of x and y in the equation

### Introduction to Matrix Algebra I

Appendix A Introduction to Matrix Algebra I Today we will begin the course with a discussion of matrix algebra. Why are we studying this? We will use matrix algebra to derive the linear regression model

### 4. MATRICES Matrices

4. MATRICES 170 4. Matrices 4.1. Definitions. Definition 4.1.1. A matrix is a rectangular array of numbers. A matrix with m rows and n columns is said to have dimension m n and may be represented as follows:

### Helpsheet. Giblin Eunson Library MATRIX ALGEBRA. library.unimelb.edu.au/libraries/bee. Use this sheet to help you:

Helpsheet Giblin Eunson Library ATRIX ALGEBRA Use this sheet to help you: Understand the basic concepts and definitions of matrix algebra Express a set of linear equations in matrix notation Evaluate determinants

### MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS Systems of Equations and Matrices Representation of a linear system The general system of m equations in n unknowns can be written a x + a 2 x 2 + + a n x n b a

### Introduction to Matrix Algebra

Psychology 7291: Multivariate Statistics (Carey) 8/27/98 Matrix Algebra - 1 Introduction to Matrix Algebra Definitions: A matrix is a collection of numbers ordered by rows and columns. It is customary

### Chapter 7. Matrices. Definition. An m n matrix is an array of numbers set out in m rows and n columns. Examples. ( 1 1 5 2 0 6

Chapter 7 Matrices Definition An m n matrix is an array of numbers set out in m rows and n columns Examples (i ( 1 1 5 2 0 6 has 2 rows and 3 columns and so it is a 2 3 matrix (ii 1 0 7 1 2 3 3 1 is a

### Matrix Algebra and Applications

Matrix Algebra and Applications Dudley Cooke Trinity College Dublin Dudley Cooke (Trinity College Dublin) Matrix Algebra and Applications 1 / 49 EC2040 Topic 2 - Matrices and Matrix Algebra Reading 1 Chapters

### L1-2. Special Matrix Operations: Permutations, Transpose, Inverse, Augmentation 12 Aug 2014

L1-2. Special Matrix Operations: Permutations, Transpose, Inverse, Augmentation 12 Aug 2014 Unfortunately, no one can be told what the Matrix is. You have to see it for yourself. -- Morpheus Primary concepts:

### Section V.3: Dot Product

Section V.3: Dot Product Introduction So far we have looked at operations on a single vector. There are a number of ways to combine two vectors. Vector addition and subtraction will not be covered here,

Section 5.4 The Quadratic Formula 481 5.4 The Quadratic Formula Consider the general quadratic function f(x) = ax + bx + c. In the previous section, we learned that we can find the zeros of this function

### 15.062 Data Mining: Algorithms and Applications Matrix Math Review

.6 Data Mining: Algorithms and Applications Matrix Math Review The purpose of this document is to give a brief review of selected linear algebra concepts that will be useful for the course and to develop

### DETERMINANTS. b 2. x 2

DETERMINANTS 1 Systems of two equations in two unknowns A system of two equations in two unknowns has the form a 11 x 1 + a 12 x 2 = b 1 a 21 x 1 + a 22 x 2 = b 2 This can be written more concisely in

### 13 MATH FACTS 101. 2 a = 1. 7. The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions.

3 MATH FACTS 0 3 MATH FACTS 3. Vectors 3.. Definition We use the overhead arrow to denote a column vector, i.e., a linear segment with a direction. For example, in three-space, we write a vector in terms

### Diagonal, Symmetric and Triangular Matrices

Contents 1 Diagonal, Symmetric Triangular Matrices 2 Diagonal Matrices 2.1 Products, Powers Inverses of Diagonal Matrices 2.1.1 Theorem (Powers of Matrices) 2.2 Multiplying Matrices on the Left Right by

### 2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

1. Systems of linear equations We are interested in the solutions to systems of linear equations. A linear equation is of the form 3x 5y + 2z + w = 3. The key thing is that we don t multiply the variables

### Vector algebra Christian Miller CS Fall 2011

Vector algebra Christian Miller CS 354 - Fall 2011 Vector algebra A system commonly used to describe space Vectors, linear operators, tensors, etc. Used to build classical physics and the vast majority

### Section 10.4 Vectors

Section 10.4 Vectors A vector is represented by using a ray, or arrow, that starts at an initial point and ends at a terminal point. Your textbook will always use a bold letter to indicate a vector (such

### SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89 by Joseph Collison Copyright 2000 by Joseph Collison All rights reserved Reproduction or translation of any part of this work beyond that permitted by Sections

### Introduction to Matrices

Introduction to Matrices Tom Davis tomrdavis@earthlinknet 1 Definitions A matrix (plural: matrices) is simply a rectangular array of things For now, we ll assume the things are numbers, but as you go on

### A linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form

Section 1.3 Matrix Products A linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form (scalar #1)(quantity #1) + (scalar #2)(quantity #2) +...

### Mathematical Procedures

CHAPTER 6 Mathematical Procedures 168 CHAPTER 6 Mathematical Procedures The multidisciplinary approach to medicine has incorporated a wide variety of mathematical procedures from the fields of physics,

### Simple Regression Theory II 2010 Samuel L. Baker

SIMPLE REGRESSION THEORY II 1 Simple Regression Theory II 2010 Samuel L. Baker Assessing how good the regression equation is likely to be Assignment 1A gets into drawing inferences about how close the

### We know a formula for and some properties of the determinant. Now we see how the determinant can be used.

Cramer s rule, inverse matrix, and volume We know a formula for and some properties of the determinant. Now we see how the determinant can be used. Formula for A We know: a b d b =. c d ad bc c a Can we

### Notes on Determinant

ENGG2012B Advanced Engineering Mathematics Notes on Determinant Lecturer: Kenneth Shum Lecture 9-18/02/2013 The determinant of a system of linear equations determines whether the solution is unique, without

### 1 Lecture: Integration of rational functions by decomposition

Lecture: Integration of rational functions by decomposition into partial fractions Recognize and integrate basic rational functions, except when the denominator is a power of an irreducible quadratic.

### A Quick Algebra Review

1. Simplifying Epressions. Solving Equations 3. Problem Solving 4. Inequalities 5. Absolute Values 6. Linear Equations 7. Systems of Equations 8. Laws of Eponents 9. Quadratics 10. Rationals 11. Radicals

### 4. Matrix inverses. left and right inverse. linear independence. nonsingular matrices. matrices with linearly independent columns

L. Vandenberghe EE133A (Spring 2016) 4. Matrix inverses left and right inverse linear independence nonsingular matrices matrices with linearly independent columns matrices with linearly independent rows

### Matrix Differentiation

1 Introduction Matrix Differentiation ( and some other stuff ) Randal J. Barnes Department of Civil Engineering, University of Minnesota Minneapolis, Minnesota, USA Throughout this presentation I have

### SECTION 8.3: THE INVERSE OF A SQUARE MATRIX

(Section 8.3: The Inverse of a Square Matrix) 8.47 SECTION 8.3: THE INVERSE OF A SQUARE MATRIX PART A: (REVIEW) THE INVERSE OF A REAL NUMBER If a is a nonzero real number, then aa 1 = a 1 a = 1. a 1, or

### Solving Systems of Linear Equations. Substitution

Solving Systems of Linear Equations There are two basic methods we will use to solve systems of linear equations: Substitution Elimination We will describe each for a system of two equations in two unknowns,

### Recall that two vectors in are perpendicular or orthogonal provided that their dot

Orthogonal Complements and Projections Recall that two vectors in are perpendicular or orthogonal provided that their dot product vanishes That is, if and only if Example 1 The vectors in are orthogonal

### Section 1.1. Introduction to R n

The Calculus of Functions of Several Variables Section. Introduction to R n Calculus is the study of functional relationships and how related quantities change with each other. In your first exposure to

### The Inverse of a Matrix

The Inverse of a Matrix 7.4 Introduction In number arithmetic every number a ( 0) has a reciprocal b written as a or such that a ba = ab =. Some, but not all, square matrices have inverses. If a square

### Diagonalisation. Chapter 3. Introduction. Eigenvalues and eigenvectors. Reading. Definitions

Chapter 3 Diagonalisation Eigenvalues and eigenvectors, diagonalisation of a matrix, orthogonal diagonalisation fo symmetric matrices Reading As in the previous chapter, there is no specific essential

### Linear Algebra Review. Vectors

Linear Algebra Review By Tim K. Marks UCSD Borrows heavily from: Jana Kosecka kosecka@cs.gmu.edu http://cs.gmu.edu/~kosecka/cs682.html Virginia de Sa Cogsci 8F Linear Algebra review UCSD Vectors The length

### Similarity and Diagonalization. Similar Matrices

MATH022 Linear Algebra Brief lecture notes 48 Similarity and Diagonalization Similar Matrices Let A and B be n n matrices. We say that A is similar to B if there is an invertible n n matrix P such that

### MAT188H1S Lec0101 Burbulla

Winter 206 Linear Transformations A linear transformation T : R m R n is a function that takes vectors in R m to vectors in R n such that and T (u + v) T (u) + T (v) T (k v) k T (v), for all vectors u

### Solving a System of Equations

11 Solving a System of Equations 11-1 Introduction The previous chapter has shown how to solve an algebraic equation with one variable. However, sometimes there is more than one unknown that must be determined

### Notes on Orthogonal and Symmetric Matrices MENU, Winter 2013

Notes on Orthogonal and Symmetric Matrices MENU, Winter 201 These notes summarize the main properties and uses of orthogonal and symmetric matrices. We covered quite a bit of material regarding these topics,

### Vieta s Formulas and the Identity Theorem

Vieta s Formulas and the Identity Theorem This worksheet will work through the material from our class on 3/21/2013 with some examples that should help you with the homework The topic of our discussion

### Section 5.3. Section 5.3. u m ] l jj. = l jj u j + + l mj u m. v j = [ u 1 u j. l mj

Section 5. l j v j = [ u u j u m ] l jj = l jj u j + + l mj u m. l mj Section 5. 5.. Not orthogonal, the column vectors fail to be perpendicular to each other. 5..2 his matrix is orthogonal. Check that

### Vectors Math 122 Calculus III D Joyce, Fall 2012

Vectors Math 122 Calculus III D Joyce, Fall 2012 Vectors in the plane R 2. A vector v can be interpreted as an arro in the plane R 2 ith a certain length and a certain direction. The same vector can be

### 9 MATRICES AND TRANSFORMATIONS

9 MATRICES AND TRANSFORMATIONS Chapter 9 Matrices and Transformations Objectives After studying this chapter you should be able to handle matrix (and vector) algebra with confidence, and understand the

### Linear Algebra: Vectors

A Linear Algebra: Vectors A Appendix A: LINEAR ALGEBRA: VECTORS TABLE OF CONTENTS Page A Motivation A 3 A2 Vectors A 3 A2 Notational Conventions A 4 A22 Visualization A 5 A23 Special Vectors A 5 A3 Vector

### Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 7 Transformations in 2-D

Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 7 Transformations in 2-D Welcome everybody. We continue the discussion on 2D

### 2.1: MATRIX OPERATIONS

.: MATRIX OPERATIONS What are diagonal entries and the main diagonal of a matrix? What is a diagonal matrix? When are matrices equal? Scalar Multiplication 45 Matrix Addition Theorem (pg 0) Let A, B, and

### Linear Dependence Tests

Linear Dependence Tests The book omits a few key tests for checking the linear dependence of vectors. These short notes discuss these tests, as well as the reasoning behind them. Our first test checks

### 1 Determinants and the Solvability of Linear Systems

1 Determinants and the Solvability of Linear Systems In the last section we learned how to use Gaussian elimination to solve linear systems of n equations in n unknowns The section completely side-stepped

### Chapter 17. Orthogonal Matrices and Symmetries of Space

Chapter 17. Orthogonal Matrices and Symmetries of Space Take a random matrix, say 1 3 A = 4 5 6, 7 8 9 and compare the lengths of e 1 and Ae 1. The vector e 1 has length 1, while Ae 1 = (1, 4, 7) has length

### 2. THE x-y PLANE 7 C7

2. THE x-y PLANE 2.1. The Real Line When we plot quantities on a graph we can plot not only integer values like 1, 2 and 3 but also fractions, like 3½ or 4¾. In fact we can, in principle, plot any real

### Basic Terminology for Systems of Equations in a Nutshell. E. L. Lady. 3x 1 7x 2 +4x 3 =0 5x 1 +8x 2 12x 3 =0.

Basic Terminology for Systems of Equations in a Nutshell E L Lady A system of linear equations is something like the following: x 7x +4x =0 5x +8x x = Note that the number of equations is not required

### Chapter 6. Orthogonality

6.3 Orthogonal Matrices 1 Chapter 6. Orthogonality 6.3 Orthogonal Matrices Definition 6.4. An n n matrix A is orthogonal if A T A = I. Note. We will see that the columns of an orthogonal matrix must be

### Chapter 19. General Matrices. An n m matrix is an array. a 11 a 12 a 1m a 21 a 22 a 2m A = a n1 a n2 a nm. The matrix A has n row vectors

Chapter 9. General Matrices An n m matrix is an array a a a m a a a m... = [a ij]. a n a n a nm The matrix A has n row vectors and m column vectors row i (A) = [a i, a i,..., a im ] R m a j a j a nj col

### v w is orthogonal to both v and w. the three vectors v, w and v w form a right-handed set of vectors.

3. Cross product Definition 3.1. Let v and w be two vectors in R 3. The cross product of v and w, denoted v w, is the vector defined as follows: the length of v w is the area of the parallelogram with

### 1 Introduction. 2 Matrices: Definition. Matrix Algebra. Hervé Abdi Lynne J. Williams

In Neil Salkind (Ed.), Encyclopedia of Research Design. Thousand Oaks, CA: Sage. 00 Matrix Algebra Hervé Abdi Lynne J. Williams Introduction Sylvester developed the modern concept of matrices in the 9th

### Matrices 2. Solving Square Systems of Linear Equations; Inverse Matrices

Matrices 2. Solving Square Systems of Linear Equations; Inverse Matrices Solving square systems of linear equations; inverse matrices. Linear algebra is essentially about solving systems of linear equations,

### Introduction to Matrices for Engineers

Introduction to Matrices for Engineers C.T.J. Dodson, School of Mathematics, Manchester Universit 1 What is a Matrix? A matrix is a rectangular arra of elements, usuall numbers, e.g. 1 0-8 4 0-1 1 0 11

### a 11 x 1 + a 12 x 2 + + a 1n x n = b 1 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2.

Chapter 1 LINEAR EQUATIONS 1.1 Introduction to linear equations A linear equation in n unknowns x 1, x,, x n is an equation of the form a 1 x 1 + a x + + a n x n = b, where a 1, a,..., a n, b are given

### Equations and Inequalities

Rational Equations Overview of Objectives, students should be able to: 1. Solve rational equations with variables in the denominators.. Recognize identities, conditional equations, and inconsistent equations.

### Lecture L3 - Vectors, Matrices and Coordinate Transformations

S. Widnall 16.07 Dynamics Fall 2009 Lecture notes based on J. Peraire Version 2.0 Lecture L3 - Vectors, Matrices and Coordinate Transformations By using vectors and defining appropriate operations between

### MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

MATH10212 Linear Algebra Textbook: D. Poole, Linear Algebra: A Modern Introduction. Thompson, 2006. ISBN 0-534-40596-7. Systems of Linear Equations Definition. An n-dimensional vector is a row or a column

### Typical Linear Equation Set and Corresponding Matrices

EWE: Engineering With Excel Larsen Page 1 4. Matrix Operations in Excel. Matrix Manipulations: Vectors, Matrices, and Arrays. How Excel Handles Matrix Math. Basic Matrix Operations. Solving Systems of

### Images and Kernels in Linear Algebra By Kristi Hoshibata Mathematics 232

Images and Kernels in Linear Algebra By Kristi Hoshibata Mathematics 232 In mathematics, there are many different fields of study, including calculus, geometry, algebra and others. Mathematics has been

### 2015 Junior Certificate Higher Level Official Sample Paper 1

2015 Junior Certificate Higher Level Official Sample Paper 1 Question 1 (Suggested maximum time: 5 minutes) The sets U, P, Q, and R are shown in the Venn diagram below. (a) Use the Venn diagram to list

### Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

Matrix Algebra A. Doerr Before reading the text or the following notes glance at the following list of basic matrix algebra laws. Some Basic Matrix Laws Assume the orders of the matrices are such that

### Similar matrices and Jordan form

Similar matrices and Jordan form We ve nearly covered the entire heart of linear algebra once we ve finished singular value decompositions we ll have seen all the most central topics. A T A is positive

### Vector Math Computer Graphics Scott D. Anderson

Vector Math Computer Graphics Scott D. Anderson 1 Dot Product The notation v w means the dot product or scalar product or inner product of two vectors, v and w. In abstract mathematics, we can talk about

### The Method of Partial Fractions Math 121 Calculus II Spring 2015

Rational functions. as The Method of Partial Fractions Math 11 Calculus II Spring 015 Recall that a rational function is a quotient of two polynomials such f(x) g(x) = 3x5 + x 3 + 16x x 60. The method

### EC9A0: Pre-sessional Advanced Mathematics Course

University of Warwick, EC9A0: Pre-sessional Advanced Mathematics Course Peter J. Hammond & Pablo F. Beker 1 of 55 EC9A0: Pre-sessional Advanced Mathematics Course Slides 1: Matrix Algebra Peter J. Hammond

### Integrals of Rational Functions

Integrals of Rational Functions Scott R. Fulton Overview A rational function has the form where p and q are polynomials. For example, r(x) = p(x) q(x) f(x) = x2 3 x 4 + 3, g(t) = t6 + 4t 2 3, 7t 5 + 3t

### MATH 551 - APPLIED MATRIX THEORY

MATH 55 - APPLIED MATRIX THEORY FINAL TEST: SAMPLE with SOLUTIONS (25 points NAME: PROBLEM (3 points A web of 5 pages is described by a directed graph whose matrix is given by A Do the following ( points

### [1] Diagonal factorization

8.03 LA.6: Diagonalization and Orthogonal Matrices [ Diagonal factorization [2 Solving systems of first order differential equations [3 Symmetric and Orthonormal Matrices [ Diagonal factorization Recall:

This assignment will help you to prepare for Algebra 1 by reviewing some of the things you learned in Middle School. If you cannot remember how to complete a specific problem, there is an example at the

### Solution of Linear Systems

Chapter 3 Solution of Linear Systems In this chapter we study algorithms for possibly the most commonly occurring problem in scientific computing, the solution of linear systems of equations. We start

### Multiple regression - Matrices

Multiple regression - Matrices This handout will present various matrices which are substantively interesting and/or provide useful means of summarizing the data for analytical purposes. As we will see,

### Linear Programming. March 14, 2014

Linear Programming March 1, 01 Parts of this introduction to linear programming were adapted from Chapter 9 of Introduction to Algorithms, Second Edition, by Cormen, Leiserson, Rivest and Stein [1]. 1

### Adding vectors We can do arithmetic with vectors. We ll start with vector addition and related operations. Suppose you have two vectors

1 Chapter 13. VECTORS IN THREE DIMENSIONAL SPACE Let s begin with some names and notation for things: R is the set (collection) of real numbers. We write x R to mean that x is a real number. A real number

### Matrix Representations of Linear Transformations and Changes of Coordinates

Matrix Representations of Linear Transformations and Changes of Coordinates 01 Subspaces and Bases 011 Definitions A subspace V of R n is a subset of R n that contains the zero element and is closed under

### The Characteristic Polynomial

Physics 116A Winter 2011 The Characteristic Polynomial 1 Coefficients of the characteristic polynomial Consider the eigenvalue problem for an n n matrix A, A v = λ v, v 0 (1) The solution to this problem

### MATHEMATICS FOR ENGINEERING BASIC ALGEBRA

MATHEMATICS FOR ENGINEERING BASIC ALGEBRA TUTORIAL 3 EQUATIONS This is the one of a series of basic tutorials in mathematics aimed at beginners or anyone wanting to refresh themselves on fundamentals.

### We call this set an n-dimensional parallelogram (with one vertex 0). We also refer to the vectors x 1,..., x n as the edges of P.

Volumes of parallelograms 1 Chapter 8 Volumes of parallelograms In the present short chapter we are going to discuss the elementary geometrical objects which we call parallelograms. These are going to

### CAHSEE on Target UC Davis, School and University Partnerships

UC Davis, School and University Partnerships CAHSEE on Target Mathematics Curriculum Published by The University of California, Davis, School/University Partnerships Program 006 Director Sarah R. Martinez,

### Eigenvalues, Eigenvectors, Matrix Factoring, and Principal Components

Eigenvalues, Eigenvectors, Matrix Factoring, and Principal Components The eigenvalues and eigenvectors of a square matrix play a key role in some important operations in statistics. In particular, they

### Math 215 HW #6 Solutions

Math 5 HW #6 Solutions Problem 34 Show that x y is orthogonal to x + y if and only if x = y Proof First, suppose x y is orthogonal to x + y Then since x, y = y, x In other words, = x y, x + y = (x y) T

### Lecture Notes 1: Matrix Algebra Part B: Determinants and Inverses

University of Warwick, EC9A0 Maths for Economists Peter J. Hammond 1 of 57 Lecture Notes 1: Matrix Algebra Part B: Determinants and Inverses Peter J. Hammond email: p.j.hammond@warwick.ac.uk Autumn 2012,

### 3.8 Finding Antiderivatives; Divergence and Curl of a Vector Field

3.8 Finding Antiderivatives; Divergence and Curl of a Vector Field 77 3.8 Finding Antiderivatives; Divergence and Curl of a Vector Field Overview: The antiderivative in one variable calculus is an important

### 9.4. The Scalar Product. Introduction. Prerequisites. Learning Style. Learning Outcomes

The Scalar Product 9.4 Introduction There are two kinds of multiplication involving vectors. The first is known as the scalar product or dot product. This is so-called because when the scalar product of

### Review of Fundamental Mathematics

Review of Fundamental Mathematics As explained in the Preface and in Chapter 1 of your textbook, managerial economics applies microeconomic theory to business decision making. The decision-making tools

### Notes for STA 437/1005 Methods for Multivariate Data

Notes for STA 437/1005 Methods for Multivariate Data Radford M. Neal, 26 November 2010 Random Vectors Notation: Let X be a random vector with p elements, so that X = [X 1,..., X p ], where denotes transpose.

### 6. Vectors. 1 2009-2016 Scott Surgent (surgent@asu.edu)

6. Vectors For purposes of applications in calculus and physics, a vector has both a direction and a magnitude (length), and is usually represented as an arrow. The start of the arrow is the vector s foot,