Mathematical Foundations of Applied Statistics: Matrix Algebra

Size: px
Start display at page:

Download "Mathematical Foundations of Applied Statistics: Matrix Algebra"

Transcription

1 Mathematical Foundations of Applied Statistics: Matrix Algebra Steffen Unkel Department of Medical Statistics University Medical Center Göttingen, Germany Winter term 2018/19 1/105

2 Literature Seber, G. A. F. (2008): A Matrix Handbook for Statisticians, Wiley. Gruber, M. H. J. (2014): Matrix Algebra for Linear Models, Wiley. Fieller, N. (2016): Basics of Matrix Algebra for Statistics with R, Chapman & Hall/CRC Press. Schmidt, K. and Trenkler, G. (2015): Einführung in die Moderne Matrix-Algebra, 3rd edition, Springer Gabler. Lang, S. (2005): Matrixalgebra mit einer Einführung in lineare Modelle, publications/matrixalgebra.pdf. Winter term 2018/19 2/105

3 Outline 1 Notation 2 Operations 3 Partitioned matrices 4 Linear independence, subspaces and rank 5 Matrix inverse 6 Definiteness of matrices and quadratic forms 7 Systems of linear equations 8 Generalized inverses and Moore-Penrose inverse 9 Determinants 10 Orthogonality 11 Trace 12 Eigenvalues and eigenvectors 13 Idempotent matrices 14 Matrix decompositions 15 Vector and matrix differentiation Winter term 2018/19 3/105

4 1 Notation A rectangular array of the form a 11 a a 1p a 21 a a 2p A = (a ij ) =......, a n1 a n2... a np where a ij R (i = 1,..., n; j = 1,..., p) is a matrix of size or dimension n p. The symbol R represents the set of real numbers. The first subscript in a ij indicates the row, the second identifies the column. Other notations are A R n p or A n p, where R n p denotes the vector space of all n-by-p real matrices. Matrices are denoted by uppercase letters in bold-faced type. Winter term 2018/19 4/105

5 1 Notation If we interchange the rows and columns of a matrix A, the resulting matrix is known as the transpose of A and is denoted by A (or A ); for example A = , A = ( Formally, if A is denoted by A = (a ij ), then A is defined as If A R n p, then A R p n. A = (a ij ) = (a ji ). ). If A is any matrix, then (A ) = A. Winter term 2018/19 5/105

6 1 Notation A vector is a matrix with a single row or column. Vectors are denoted by lowercase letters in bold-faced type. A vector a R n is considered to be a column vector and elements in a vector are often identified by a single subscript; for example a 1 a = a 2 a 3. A row vector is regarded as a transpose of a column vector. Thus, if a is a column vector, then a is a row vector. A single real number is called a scalar. A variable representing a scalar is denoted by a lowercase italic letter, such as c. Winter term 2018/19 6/105

7 1 Notation Two matrices or two vectors are equal if they are of the same size and if all the elements in corresponding positions are equal. If A = A, then the matrix A is said to be symmetric; for example A = , is symmetric. All symmetric matrices are square. Winter term 2018/19 7/105

8 1 Notation Square p p matrix: A = a 11 a a 1p a 21 a a 2p a p1 a p2... a pp. The main diagonal of A consists of the elements a 11, a 22,..., a pp. If a matrix contains zeros in all off-diagonal positions, it is said to be a diagonal matrix. Winter term 2018/19 8/105

9 1 Notation For example, consider the matrix D = This matrix can also be defined as D = diag(8, 3, 0, 4). We also use the notation diag(a) to indicate a diagonal matrix with the same diagonal elements as A; for example A = , diag(a) = Winter term 2018/19 9/105

10 1 Notation A diagonal matrix with a 1 in each diagonal position is called an identity matrix, and is denoted by I (or I n to emphasize that the matrix is of order n): for example I 3 = A lower triangular matrix is a square matrix with zeros above the diagonal; for example L = An upper triangular matrix is defined similarly. Winter term 2018/19 10/105

11 1 Notation A vector of n ones is denoted by 1 n ; for example 1 3 = (1, 1, 1). We define J n = 1 n 1 n. An n p matrix of zeros is denoted by O n p and a vector of n zeros by 0 n. If the dimension of the matrix I n, J n or O n p is clear from the context, the subscript n is omitted. The same holds for the vector 1 n or 0 n. Winter term 2018/19 11/105

12 1 Notation Exercises 1 4 Winter term 2018/19 12/105

13 2 Operations - Sum of two matrices or two vectors If two matrices or two vectors are of the same size, they are said to be conformal for addition. Their sum is found by adding corresponding elements. Thus, if A is n p and B is n p, then C = A + B is also n p and is found as C = (c ij ) = (a ij + b ij ). The difference C = A B between to conformal matrices A and B is defined similarly: C = (c ij ) = (a ij b ij ). If A and B are both n p, then i. A + B = B + A. ii. (A + B) = A + B. Winter term 2018/19 13/105

14 2 Operations - Product of a scalar and a matrix Any scalar can be multiplied by any matrix. The product of a scalar and a matrix is defined as the product of each element of the matrix and the scalar: ca 11 ca ca 1p ca 21 ca ca 2p ca = (ca ij ) =......, ca n1 ca n2... ca np Since ca ij = a ij c, the product of a scalar and a matrix is commutative: ca = Ac. Winter term 2018/19 14/105

15 2 Operations - Product of two matrices or two vectors In order for the product AB to be defined, the number of columns in A must equal the number of rows in B, in which case A and B are said to be conformal for multiplication. Then, the (ij)th element of the product C = AB is defined as c ij = k a ik b kj, which is the sum of products of the elements in the ith row of A and the elements in the jth column of B. If A is n m and B is m p, then C = AB is n p. Winter term 2018/19 15/105

16 2 Operations - Product of two matrices or two vectors In general AB BA. Thus, matrix multiplication is not commutative. Matrix multiplication is distributive over addition or subtraction: i. A(B ± C) = AB ± AC, ii. (A ± B)C = AC ± BC. Multiplication involving vectors follows the same rules as for matrices. Winter term 2018/19 16/105

17 2 Operations - Product of two matrices or two vectors For example, if b is p 1, then b b = b1 2 + b b2 p is a sum of squares and b 2 1 b 1 b 2... b 1 b p bb b 2 b 1 b b 2 b p = b p b 1 b p b 2... bp 2 The distance from the origin to the point b is also referred to as the length or norm of b: p b = b b = bi 2. i=1 The distance between conformal a and b is defined to be d(a, b) = a b. Winter term 2018/19 17/105

18 2 Operations - Product of two matrices or two vectors If A is n p and B is p m, then (AB) = B A. If A,B, and C are conformal so that ABC is defined, then (ABC) = C B A. Let A be any n p matrix. Then A A and AA have the following properties: i. A A is p p and its elements are products of the columns of A. ii. AA is n n and its elements are products of the rows of A. iii. Both A A and AA are symmetric. Winter term 2018/19 18/105

19 2 Operations - Product of two matrices or two vectors If A is a symmetric p p matrix and y is a p 1 vector, the product y Ay = a ii yi 2 + a ij y i y j i i j is called a quadratic form. If x is n 1, y is p 1, and A is n p, the product x Ay = i,j a ij x i y j is called a bilinear form. Winter term 2018/19 19/105

20 2 Operations - Hadamard product If two matrices A and B are of the same size, the Hadamard (elementwise) product A B is found by multiplying corresponding elements: a 11 b 11 a 12 b a 1p b 1p a 21 b 21 a 22 b a 2p b 2p A B = (a ij b ij ) = a n1 b n1 a n2 b n2... a np b np Winter term 2018/19 20/105

21 2 Operations - Kronecker product Let A be an m n and B be a p q matrix. The Kronecker product of A and B is defined by the mp nq matrix a 11 B a 12 B... a 1n B a 21 B a 22 B... a 2n B A B = (a ij B) = a m1 B a m2... a mn B The following are properties of the Kronecker product: i. Assume that A and B are the same size. Then (a) (A + B) C = A C + B C. (b) C (A + B) = C A + C B. ii. Assuming A, B, C, and D have appropriate dimensions so that AC and BD are defined, (A B)(C D) = (AC BD). iii. The transpose (A B) = A B. Winter term 2018/19 21/105

22 2 Operations - Vec-operator The vec-operator transforms a matrix into a vector, by stacking all the columns of this matrix one underneath the other. Let A = (a 1, a 2,..., a n ) be an m n matrix. Then a 1 a 2 vec(a) =.. a n Some properties: i. vec(a + B) = vec(a) + vec(b). ii. vec(abc) = (C A)vec(B). iii. vec(ab) = (I A)vec(B) = (B I)vec(A). iv. vec(x ) = vec(x) = x. v. vec(xy ) = y x. Winter term 2018/19 22/105

23 2 Operations - Direct sum of matrices The direct sum of any pair of matrices A of size m n and B of size p q is a matrix of size (m + p) (n + q) defined as ( ) A Om q A B =. B O p n The direct sum of matrices is a special type of block or partitioned matrix. In general, the direct sum of n matrices is A 1 O... O n O A 2... O A i = diag (A 1, A 2,..., A n ) =. i= O O... A n. Winter term 2018/19 23/105

24 2 Operations Exercises 5 13 Winter term 2018/19 24/105

25 3 Partitioned matrices It is sometimes convenient to partition a matrix into submatrices. For example, a partitioning of a matrix A into four (square or rectangular) submatrices of appropriate sizes can be indicated symbolically as follows: ( ) A11 A A = 12. A 21 A 22 To illustrate, let the 4 5 matrix A be partitioned as ( ) A = = A11 A 12 A 21 A Winter term 2018/19 25/105

26 3 Partitioned matrices If two matrices A and B are conformal for multiplication, and if A and B are partitioned so that the submatrices are appropriately conformal, then the product AB can be found using the usual pattern of row by column multiplication with the submatrices as if they were single elements. For example, ( ) ( ) A11 A AB = 12 B11 B 12 A 21 A 22 B 21 B 22 ( A11 B = 11 + A 12 B 21 A 11 B 12 + A 12 B 22 A 21 B 11 + A 22 B 21 A 21 B 12 + A 22 B 22 ). Winter term 2018/19 26/105

27 3 Partitioned matrices If B is replaced by a vector b partitioned into two sets of elements, and if A is correspondingly partitioned into two sets of columns, then the previous equation becomes ( ) b1 Ab = (A 1, A 2 ) = A 1 b 1 + A 2 b 2, b 2 where the number of columns of A 1 is equal to the number of elements of b 1, and A 2 and b 2 are similarly conformal. The partitioned multiplication above can be extended to individual columns of A and individual elements of b: b 1 b 2 Ab = (a 1, a 2,..., a p ). = b 1a 1 + b 2 a b p a p. b p Winter term 2018/19 27/105

28 3 Partitioned matrices Thus, Ab is expressible as a linear combination of the columns of A, in which the coefficients are elements of b. The product of a row vector and a matrix, a B, can be expressed as a linear combination of the rows of B, in which the coefficients are elements of a : b 1 a b B = (a 1, a 2,..., a n ) 2. b n = a 1b 1 +a 2 b 2 + +a n b n. If a matrix A is partitioned as A = (A 1, A 2 ), then ( ) A = (A 1, A 2 ) A = 1 A. 2 Winter term 2018/19 28/105

29 3 Partitioned matrices Exercise 14 Winter term 2018/19 29/105

30 4 Linear independence, subspaces and rank A set of vectors {a 1, a 2,..., a p } in R n is said to be linearly dependent if scalars c 1, c 2,..., c p (not all zero) can be found such that c 1 a 1 + c 2 a c p a p = 0. If no coefficients c 1, c 2,..., c p can be found, the set of vectors a 1, a 2,..., a p is said to be linearly independent. A subspace of R n is a subset that is also a vector space. Given a collection a 1, a 2,..., a p R n, we define the following subspace as the span of {a 1, a 2,..., a p }: p span{a 1, a 2,..., a p } = b j a j : b j R. j=1 Winter term 2018/19 30/105

31 4 Linear independence, subspaces and rank If S R n is a subspace, then it is possible to find linearly independent basis vectors a 1, a 2,..., a k S such that S = span{a 1, a 2,..., a k }. All bases for a subspace S have the same number of elements. This number is the dimension and is denoted by dim(s). Winter term 2018/19 31/105

32 4 Linear independence, subspaces and rank There are two important subspaces associated with an n p matrix A. The range of A is defined by range(a) = {y R n y = Ax for some x R p }. The null space of A is defined by null(a) = {x R p Ax = 0}. If A R n p, then dim(null(a)) + dim(range(a)) = p. Winter term 2018/19 32/105

33 4 Linear independence, subspaces and rank The rank of any rectangular matrix A is defined as rank(a) = number of linearly independent columns of A = number of linearly independent rows of A = dim((range(a)). Suppose a rectangular matrix is n p of rank p, where p < n. Then A is said to be of full rank. We say that A is rank deficient if rank(a) < p. The maximum possible rank of an n p matrix A cannot be greater than either n or p; that is, rank(a) min{n, p}. Thus, in a rectangular matrix, the rows or columns (or both) are linearly dependent. Winter term 2018/19 33/105

34 4 Linear independence, subspaces and rank A common approach to finding the rank of a matrix is to reduce it to a simpler form, generally row echelon form, by elementary row operations. A matrix is in row echelon form when it satisfies the following conditions: 1 all nonzero rows (rows with at least one nonzero element) are above any rows of all zeroes, and 2 the leading coefficient (the first nonzero number from the left, also called the pivot) of a non-zero row is always strictly to the right of the leading coefficient of the row above it. Once in row echelon form, the rank equals the number of pivots and also the number of nonzero rows. Winter term 2018/19 34/105

35 4 Linear independence, subspaces and rank The following properties hold: i. rank(a + B) rank(a) + rank(b). ii. rank(ab) rank(a) and rank(ab) rank(b), hence rank(ab) min{rank(a), rank(b)}. iii. Multiplication by a full rank square matrix does not change the rank; that is, if B and C are full rank square matrices, rank(ab) = rank(ca) = rank(a). iv. For any matrix A, rank(a A) = rank(aa ) = rank(a ) = rank(a). Winter term 2018/19 35/105

36 4 Linear independence, subspaces and rank Exercises Winter term 2018/19 36/105

37 5 Matrix inverse A full rank square matrix is said to be nonsingular. A nonsingular matrix A has a unique inverse, denoted by A 1, with the property that AA 1 = A 1 A = I. From this definition it is clear that (A 1 ) 1 = A. If A is square and rank deficient, then it does not have an inverse and is said to be singular. Winter term 2018/19 37/105

38 5 Matrix inverse The inverse of a nonsingular matrix A can be found using the Gauss-Jordan method. The inverse A 1 is obtained by transforming the augmented matrix [A I], using elementary row operations, into the matrix [I A 1 ]. A method for finding the inverse using determinants will be presented later. Winter term 2018/19 38/105

39 5 Matrix inverse If B is nonsingular and AB = CB, then we can multiply on the right by B 1 to obtain A = C. Similarly, if A is nonsingular, the system of equations Ax = c has the unique solution x = A 1 c. Two properties of inverses: i. If A is nonsingular, then A is nonsingular and its inverse can be found as (A ) 1 = (A 1 ). ii. If A and B are nonsingular matrices of the same size, then AB is nonsingular and (AB) 1 = B 1 A 1. Winter term 2018/19 39/105

40 5 Matrix inverse If A is symmetric, nonsingular, and is partitioned as ( ) A11 A A = 12, A 21 A 22 and if B = A 22 A 21 A 1 11 A 12, then, provided A 1 11 exist, the inverse of A is given by ( A 1 A 1 = 11 + A 1 11 A 12B 1 A 21 A 1 11 A 1 11 A 12B 1 ) B 1 A 21 A 1 11 B 1 and B 1. Winter term 2018/19 40/105

41 5 Matrix inverse Exercises Winter term 2018/19 41/105

42 6 Definiteness of matrices and quadratic forms Any quadratic form y Ay can be expressed as ( ) y Ay = y A + A y, 2 and thus the matrix of a quadratic form can always be chosen to be symmetric. If the symmetric matrix A has the property y Ay > 0 for all possible y except y = 0, then the quadratic form y Ay is said to be positive definite, and A is said to be a positive definite matrix. Similarly, if y Ay 0 for all y and there is at least one y 0 such that y Ay = 0, then y Ay and A are said to be positive semidefinite. Winter term 2018/19 42/105

43 6 Definiteness of matrices and quadratic forms A is a negative definite matrix if A is positive definite. A is a negative semidefinite matrix if A is positive semidefinite. A matrix which is neither positive definite, negative definite, positive semidefinite, nor negative semidefinite is called indefinite. Winter term 2018/19 43/105

44 6 Definiteness of matrices and quadratic forms If A is positive definite, then all its diagonal elements a ii are positive. If A is positive semidefinite, than all a ii 0. A positive definite matrix is nonsingular. If A is positive definite, then A 1 is positive definite. Let B be an n p matrix. i. If rank(b) = p, then B B is positive definite. ii. If rank(b) < p, then B B is positive semidefinite. Winter term 2018/19 44/105

45 6 Definiteness of matrices and quadratic forms Note that if B is a square matrix, the matrix BB = B 2 is not necessarily positive semidefinite. For example, let Then B 2 = ( B = ) ( ), B B =. ( ). In this case, B 2 is not positive semidefinite, but B B is positive semidefinite, since y B By = 2(y 1 2y 2 ) 2. Winter term 2018/19 45/105

46 6 Definiteness of matrices and quadratic forms If A is positive definite and is partitioned in the form ( ) A11 A A = 12, A 21 A 22 where A 11 and A 22 are square, then A 11 and A 22 are positive definite. Winter term 2018/19 46/105

47 6 Definiteness of matrices and quadratic forms Exercises Winter term 2018/19 47/105

48 7 Systems of linear equations The system of n linear equations in p unknowns a 11 x 1 + a 12 x a 1p x p = c 1 a 21 x 1 + a 22 x a 2p x p = c 2. a n1 x 1 + a n2 x a np x p = c n can be written in matrix form as Ax = c, where A is n p, x is p 1 and c is n 1. Winter term 2018/19 48/105

49 7 Systems of linear equations If n = p and A is nonsingular, then there exists a unique solution vector x obtained as x = A 1 c. If the system of equations Ax = c has one or more solution vectors, it is said to be consistent. If the system has no solution, it is said to be inconsistent. The system of equations Ax = c has at least one solution vector if and only if rank(a) = rank([a c]), where [A c] is an augmented matrix in which c has been appended to the coefficient matrix A as an additional column. A consistent system of equations can be solved by the usual methods for eliminating variables. A method involving generalized inverses is given later. Winter term 2018/19 49/105

50 7 Systems of linear equations Exercise 22 Winter term 2018/19 50/105

51 8 Generalized inverses and Moore-Penrose inverse We now consider generalized inverses of those matrices that do not have inverses in the usual sense. A generalized inverse of an n p matrix A is any p n matrix A that satisfies AA A = A. A generalized inverse is not unique except when A is nonsingular, in which case A = A 1. Every matrix, whether square or rectangular has a generalized inverse. This holds even for vectors. Winter term 2018/19 51/105

52 8 Generalized inverses and Moore-Penrose inverse Let A = Let A 1 = / , A 2 = /2 1/ It is easily verified that AA 1 A = A and AA 2 A = A. Winter term 2018/19 52/105

53 8 Generalized inverses and Moore-Penrose inverse Suppose A is n p of rank r and that A is partitioned as ( ) A11 A A = 12, A 21 A 22 where A 11 is r r of rank r. Then a generalized inverse of A is given by ( ) A A 1 = 11 O, O O where the three O matrices are of appropriate sizes so that A is p n. The nonsingular submatrix need not be in the A 11 position. Winter term 2018/19 53/105

54 8 Generalized inverses and Moore-Penrose inverse Algorithm for finding a generalized inverse A for any n p matrix of rank r: 1 Find any nonsingular r r submatrix C. 2 Compute C 1 and (C 1 ). 3 Replace the elements of C by the elements of (C 1 ). 4 Replace all other elements in A by zeros. 5 Transpose the resulting matrix. Winter term 2018/19 54/105

55 8 Generalized inverses and Moore-Penrose inverse Let A be n p of rank r and let A be any generalized inverse of A and let (A A) be any generalized inverse of A A. Then i. rank(a A) = rank(aa ) = rank(a) = r. ii. (A ) = (A ). iii. A = A(A A) A A and A = A A(A A) A. iv. A = (A A) A. v. A(A A) A is symmetric, has rank r and is invariant to the choice of (A A). Winter term 2018/19 55/105

56 8 Generalized inverses and Moore-Penrose inverse Generalized inverses can be used to find solutions to a system of equations of less than full rank. If the system of equations Ax = c is consistent and if A is any generalized inverse for A, then x = A c is a solution. If Ax = c is consistent, then all possible solutions can be obtained by using all possible values of A in x = A c if c 0. The system of equations Ax = c has a solution if and only if for any generalized inverse A of A AA c = c. Winter term 2018/19 56/105

57 8 Generalized inverses and Moore-Penrose inverse The Moore-Penrose inverse of a matrix is a generalized inverse that is always unique. A matrix A + is the Moore-Penrose inverse of A if i. A + is a generalized inverse of A. ii. A + is reflexive (A + AA + = A + ). iii. A + A is symmetric. iv. AA + is symmetric. The generalized inverse and the Moore-Penrose inverse of a nonsingular matrix are its ordinary inverse. Winter term 2018/19 57/105

58 8 Generalized inverses and Moore-Penrose inverse Exercises Winter term 2018/19 58/105

59 9 Determinants The determinant of a square matrix A is denoted det(a) or A. Let A be an n n matrix. Let A ij be the (n 1) (n 1) submatrix formed by deleting the ith row and the jth column of A. Then formulae for expanding determinants are det(a) = n ( 1) i+j a ij det(a ij ), j=1 (i fixed) and det(a) = n ( 1) i+j a ij det(a ij ), (j fixed). i=1 Winter term 2018/19 59/105

60 9 Determinants For example, expanding along the first row, we have = = ((2)(9) (4)(3)) ((1)(9) (4)(1)) +((1)(3) (2)(1)) = = 2. For example, expanding along the second column, we have = ( 1) = ( 1)((1)(9) (4)(1)) + 2((1)(9) (1)(1)) 3((1)(4) (1)(1)) = = 2. Winter term 2018/19 60/105

61 9 Determinants The determinants of some special square matrices are as follows: i. If D = diag(d 1,..., d n ), then det(d) = n i=1 d i. ii. The determinant of a triangular matrix is the product of the diagonal elements. iii. If A is singular, then det(a) = 0. iv. If A is nonsingular, then det(a) 0. v. If A is positive definite, then det(a) > 0. vi. det(a ) = det(a). vii. If A is nonsingular, then det(a 1 ) = det(a) 1. viii. If an n n matrix is multiplied by a scalar, the determinant becomes det(ca) = c n det(a). Winter term 2018/19 61/105

62 9 Determinants If A and B are of the same size, then i. det(a) det(b) = det(ab). ii. det(ab) = det(ba). iii. det(a 2 ) = det(a) 2. iv. In general, det(a) + det(b) = det(a + B) does not apply. Winter term 2018/19 62/105

63 9 Determinants If the square matrix A is partitioned as ( ) A11 A A = 12 A 21 A 22, and if A 11 and A 22 are square and nonsingular (but not necessarily the same size) then det(a) = det(a 11 ) det(a 22 A 21 A 1 11 A 12) = det(a 22 ) det(a 11 A 12 A 1 22 A 21). Winter term 2018/19 63/105

64 9 Determinants Adjoint method for finding the inverse of a matrix: let A be an n n matrix with det(a) 0. Then A 1 = 1 det(a) adj(a), where adj(a) is the adjoint matrix of A with elements C ji, the transpose of a matrix of cofactors C ij = ( 1) i+j det(a ij ), where A ij is the (n 1) (n 1) submatrix formed by deleting the ith row and jth column of A. Winter term 2018/19 64/105

65 9 Determinants Exercises Winter term 2018/19 65/105

66 10 Orthogonality Two n 1 vectors a and b are said to be orthogonal if a b = 0. Geometrically, two orthogonal vectors are perpendicular to each other. Let θ be the angle between vectors a and b. The vector from the terminal point of a to the terminal point of b can be represented as c = b a. Winter term 2018/19 66/105

67 10 Orthogonality 42 MATRIX ALGEBRA Figure 2.4 Vectors a and b in 3-space. Figure: Vectors a and b in three-dimensional space. Winter term 2018/19 67/105

68 10 Orthogonality The law of cosines for the relationship of θ to the sides of the triangle can be stated in vector form as cos (θ) = a a + b b (b a) (b a) 2 (a a)(b b) = a a + b b (b b + a a 2a b) 2 (a a)(b b) = a b. (a a)(b b) When θ = 90, a b = 0 since cos(90 ) = 0. Thus, a and b are perpendicular when a b = 0. Winter term 2018/19 68/105

69 10 Orthogonality If a a = 1, the vector a is said to be normalized. A vector b can be normalized by dividing by its length. Thus c = is normalized so that c c = 1. b b b A set of p 1 vectors c 1, c 2,..., c p that are normalized and mutually orthogonal is said to be an orthonormal set of vectors. Winter term 2018/19 69/105

70 10 Orthogonality If the p p matrix C = (c 1, c 2,..., c p ) has orthonormal columns, C is called an orthogonal matrix. An orthogonal p p matrix C has the property C C = CC = I p. Thus an orthogonal matrix has orthonormal rows as well as orthonormal columns. A p k matrix C is said to be a columnwise orthonormal matrix if C C = I k. A p k matrix C is said to be a rowwise orthonormal matrix if CC = I p. Winter term 2018/19 70/105

71 10 Orthogonality To illustrate an orthogonal matrix, we start with A = whose columns are mutually orthogonal but not orthonormal. To normalize the three columns, we divide by their respective lengths, 3, 6 and 2, to obtain the matrix C = 1/ 3 1/ 6 1/ 2 1/ 3 2/ 6 0 1/ 3 1/ 6 1/ 2. whose columns are orthonormal. Note that the rows of C are also orthonormal, so that C is an orthogonal matrix. Winter term 2018/19 71/105

72 10 Orthogonality Multiplication of a vector by an orthogonal matrix has the effect of rotating axes. If a point x is transformed to z = Cx, where C is orthogonal, then z z = (Cx) (Cx) = x C Cx = x Ix = x x. Hence, the transformation from x to z is a rotation. If the p p matrix C is orthogonal and A is any p p matrix, then i. 1 c ij 1, where c ij is any element of C. ii. det(c) = +1 or 1. iii. det(c AC) = det(a). Winter term 2018/19 72/105

73 10 Orthogonality Exercises Winter term 2018/19 73/105

74 11 Trace The trace of an n n matrix A = (a ij ) is a scalar function defined as the sum of the diagonal elements of A; that is, tr(a) = n i=1 a ii. For example, suppose A = Then tr(a) = = Winter term 2018/19 74/105

75 11 Trace Some properties of the trace are: i. If A and B are n n, then tr(a ± B) = tr(a) ± tr(b). ii. If A is n p and B is p n, then. iii. If A is n p, then tr(ab) = tr(ba). tr(a A) = where a j is the jth column of A. iv. If A is n p, then tr(aa ) = where a i is the ith row of A. Winter term 2018/19 75/105 p a j a j, j=1 n a i a i, i=1

76 11 Trace v. If A = (a ij ) is an n p matrix with representative element a ij, then n p tr(a A) = tr(aa ) = aij 2. i=1 j=1 vi. If A is any n n matrix and P is any n n nonsingular matrix, then tr(p 1 AP) = tr(a). vii. If A is any n n matrix and C is any n n orthogonal matrix, then tr(c AC) = tr(a). viii. If A is n p of rank r and A is a generalized inverse of A, then tr(a A) = tr(aa ) = r. Winter term 2018/19 76/105

77 11 Trace Exercises Winter term 2018/19 77/105

78 12 Eigenvalues and eigenvectors For every square matrix A, a scalar λ and a nonzero vector x can be found such that Ax = λx, where λ is an eigenvalue of A and x is an eigenvector. To find λ and x for a matrix A, we write the previous equation as (A λi)x = 0. The square matrix (A λi) is singular and we can solve for λ using det(a λi) = 0, which is known as the characteristic equation. Winter term 2018/19 78/105

79 12 Eigenvalues and eigenvectors If A is n n, the characteristic equation will have n roots; that is, A will have n eigenvalues λ 1, λ 2,..., λ n. The λ s will not necessarily all be distinct, or all nonzero, or even all real. After finding λ 1, λ 2,..., λ n, the accompanying eigenvectors x 1, x 2,..., x n can can be found by solving the homogeneous linear system of equations (A λi)x = 0. Winter term 2018/19 79/105

80 12 Eigenvalues and eigenvectors If x is an eigenvector of A, kx is also an eigenvector. Eigenvectors are therefore unique only up to multiplication by a scalar. The length of x is arbitrary, but its direction from the origin is unique. Typically, an eigenvector x is scaled to normalized form so that x x = 1. Winter term 2018/19 80/105

81 12 Eigenvalues and eigenvectors If λ is an eigenvalue of A, then cλ is an eigenvalue of ca. If λ is an eigenvalue of A and x is the corresponding eigenvector of A, then cλ + k is an eigenvalue of the matrix ca + ki and x is an eigenvector of ca + ki, where c and k are scalars. If λ is an eigenvalue of A, then λ 2 is an eigenvalue of A 2. This can be extended to any power of A; that is, λ k is an eigenvalue of A k and x is the corresponding eigenvector. If λ is an eigenvalue of the nonsingular matrix A, 1/λ is an eigenvalue of A 1 and x is an eigenvector of both A and A 1. Winter term 2018/19 81/105

82 12 Eigenvalues and eigenvectors The eigenvalues of A + B are not of the form λ A + λ B, where λ A is an eigenvalue of A and λ B is an eigenvalue of B. Similarly, the eigenvalues of AB are not products of the form λ A λ B. However, the (nonzero) eigenvalues of AB are the same as those of BA. If x is an eigenvector of AB, then Bx is an eigenvector of BA. Let A be any n n matrix. i. If P is any n n nonsingular matrix, then A and P 1 AP have the same eigenvalues. ii. If C is any n n orthogonal matrix, then A and C AC have the same eigenvalues. Winter term 2018/19 82/105

83 12 Eigenvalues and eigenvectors Let A be an n n symmetric matrix. i. The eigenvalues λ 1, λ 2,..., λ n of A are real. ii. The eigenvectors x 1, x 2,..., x k of A corresponding to distinct eigenvalues λ 1, λ 2,..., λ k are mutually orthogonal. If A is any n n matrix with eigenvalues λ 1, λ 2,..., λ n, then i. det(a) = n i=1 λ i. ii. tr(a) = n i=1 λ i. iii. If A is positive definite, then λ i > 0 for i = 1, 2,..., n. iv. If A is positive semidefinite, then λ i 0 for i = 1, 2,..., n. The number of eigenvalues λ i for which λ i > 0 is the rank of A. Winter term 2018/19 83/105

84 12 Eigenvalues and eigenvectors Exercises Winter term 2018/19 84/105

85 13 Idempotent matrices A square matrix A is said to be idempotent if A 2 = A. The only nonsingular idempotent matrix is the matrix I. If A is singular, symmetric, and idempotent, then A is positive semidefinite. If A is an n n symmetric idempotent matrix of rank r, then A has r eigenvalues equal to 1 and n r eigenvalues equal to 0. Winter term 2018/19 85/105

86 13 Idempotent matrices If A is symmetric and idempotent of rank r, then rank(a) = tr(a) = r. If A is an n n idempotent matrix, P is an n n nonsingular matrix, and C is an n n orthogonal matrix, then i. I A is idempotent. ii. A(I A) = O and (I A)A = O. iii. P 1 AP is idempotent. iv. C AC is idempotent. (If A is symmetric, C AC is a symmetric idempotent matrix.) Winter term 2018/19 86/105

87 13 Idempotent matrices Let A be n p of rank r, let A be any generalized inverse of A, and let (A A) be any generalized inverse of A A. Then A A, AA, and A(A A) A are all idempotent. Suppose that the n n symmetric matrix A can be written as A = k i=1 A i for some k, where each A i is an n n symmetric matrix. Then any two of the following conditions implies the third condition. i. A is idempotent. ii. Each of A 1, A 2,..., A k is idempotent. iii. A i A j = O for i j. If I = k i=1 A i, where each n n matrix A i is symmetric of rank r i, and if n = k i=1 r i, then both of the following are true: i. Each of A 1, A 2,..., A k is idempotent. ii. A i A j = O for i j. Winter term 2018/19 87/105

88 13 Idempotent matrices Exercises Winter term 2018/19 88/105

89 14 Matrix decompositions If A is a p p symmetric matrix with eigenvalues λ 1, λ 2,..., λ p and normalized eigenvectors e 1, e 2,..., e p, then A can be expressed as A = EΛE p = λ j e j e j, j=1 where Λ = diag(λ 1, λ 2,..., λ p ) and E is the orthogonal matrix E = (e 1, e 2,..., e p ). The result above is the eigendecomposition (or spectral decomposition of A. E diagonalizes A; that is, E AE = Λ. Winter term 2018/19 89/105

90 14 Matrix decompositions If a p p matrix A is positive definite, we can use the eigendecomposition to find a square root matrix A 1/2. Since the eigenvalues of A are positive, we can substitute the square roots λ j for λ j in the eigendecomposition of A, to obtain A 1/2 = EΛ 1/2 E, where Λ 1/2 = diag( λ 1, λ 2,..., λ p ). The matrix A 1/2 is symmetric and has the property A 1/2 A 1/2 = (A 1/2 ) 2 = A. Winter term 2018/19 90/105

91 14 Matrix decompositions Let X R n p and min{n, p} = t. Expressing X by its singular value decomposition (SVD) gives X = UΣV = t σ j u j v j, j=1 where Σ R n p is a rectangular diagonal matrix with the singular values of X, σ 1 σ 2... σ t 0, on the diagonal and U = (u 1,..., u n ) R n n and V = (v 1,..., v p ) R p p are orthogonal matrices containing the left and right singular vectors of X, respectively. Winter term 2018/19 91/105

92 14 Matrix decompositions Applications of the SVD: 1 rank(x) = r min{n, p}, where r is equal to the number of the nonzero singular values, σ 1 σ 2... σ r > 0, of X. 2 The Moore-Penrose inverse X + R p n is X + = V r Σ + r U r, where Σ + r = diag(σ 1 1,..., σ 1 r ) R r r and V r and U r contain the first r columns of V and U, respectively. Winter term 2018/19 92/105

93 14 Matrix decompositions 3 Low-rank approximation: For k < r = rank(x), define X k = U k Σ k V k = k σ j u j v j, j=1 where Σ k = diag(σ 1,..., σ k ) R k k. Least-squares property: X k is the solution of min Y X Y 2 F subject to rank(y) k with where X F = X X k 2 F = r j=k+1 σ j u j v j n tr(x X) = p i=1 j=1 2 F x 2 ij. = r j=k+1 σ 2 j, Winter term 2018/19 93/105

94 14 Matrix decompositions Figure: Melencolia I (Albrecht Du rer) Winter term 2018/19 94/105

95 14 Matrix decompositions Figure: Image compression: SVDs of Dürer s magic square Winter term 2018/19 95/105

96 14 Matrix decompositions The SVD is very general in the sense that it can be applied to any n p matrix whereas the eigenvalue decomposition can only be applied to certain classes of square matrices. Nevertheless, the two decompositions are related. Given an SVD of X, as described above, the following relations hold: 1 X X = VΣ U UΣV = V(Σ Σ)V. 2 XX = UΣV VΣ U = U(ΣΣ )U. Consequently, i. The columns of V (right singular vectors) are eigenvectors of X X. ii. The columns of U (left singular vectors) are eigenvectors of XX. iii. The nonzero elements of Σ are the square roots of the nonzero eigenvalues of X X or XX. Winter term 2018/19 96/105

97 14 Matrix decompositions Exercises Winter term 2018/19 97/105

98 15 Vector and matrix differentiation Suppose the function f : R p R, x = (x 1,..., x p ) f (x) = f (x 1,..., x p ) is given. The graph of f is a plane in R p+1. For example, f : R 2 R with f (x 1, x 2 ) = x x f(x1, x2) x x1 2 2 Winter term 2018/19 98/105

99 15 Vector and matrix differentiation Die p partial derivatives of a function f (x) = f (x 1,..., x p ) can be summarized by a vector, called the gradient f (x) = f (x) x = f (x) x 1. f (x) x p. The vector f (x) points to the direction of the steepest ascent. Winter term 2018/19 99/105

100 15 Vector and matrix differentiation Let H(x) be the matrix of the second derivatives of f (x) with respect to the vector x, named the Hessian matrix H(f (x)) = 2 f (x) x x = 2 f (x) x1 2 2 f (x) x 2 x 1. 2 f (x) x p x 1 The Hessian matrix is symmetric. 2 f (x) x 1 x f (x) x f (x) x p x f (x) x 1 x p 2 f (x) x 2 x p f (x) x 2 p. Winter term 2018/19 100/105

101 15 Vector and matrix differentiation The gradient and the Hessian matrix of a function f : R p R can help to determine local optima of f. Let x 0 be a local optimum of f. Then f (x 0 ) = 0. The Hessian informs us if and what kind of local optimum there is: i. H(f (x 0 )) positive definite: local minimum. ii. H(f (x 0 )) negative definite: local maximum. iii. H(f (x 0 )) indefinite: saddle point. Winter term 2018/19 101/105

102 15 Vector and matrix differentiation Consider a function u = f (x) of the p variables in x. In many cases we can find an optimum of u by solving the system of p equations u x = 0. Occasionally the situation requires the optimization of the function u, subject to q constraints on x. We denote the constraints as h 1 (x) = 0, h 2 (x) = 0,..., h q (x) = 0 or, more succinctly, h(x) = 0. Winter term 2018/19 102/105

103 15 Vector and matrix differentiation Optimization of u subject to h(x) = 0 can be carried out using the method of Lagrange multipliers. We denote a vector of Lagrange multipliers by λ and let y = (x, λ ). We then let v = u + λ h(x). The optimum of u subject to h(x) = 0 is obtained by solving the equations y v = 0 or, equivalently where u x + h λ = 0 and h(x) = 0, x h x = h 1 x h 1 x p... h q x 1. h q x p. Winter term 2018/19 103/105

104 15 Vector and matrix differentiation Let a = (a 1,..., a p ), x = (x 1,..., x p ) and A be a symmetric p p matrix. Then i. ii. iii. iv. (a x) x = (x a) x = a. (Ax) x = A. (x Ax) x (x Ax) A = 2Ax. = xx. Winter term 2018/19 104/105

105 15 Vector and matrix differentiation Exercises Winter term 2018/19 105/105

Chapter 1. Matrix Algebra

Chapter 1. Matrix Algebra ST4233, Linear Models, Semester 1 2008-2009 Chapter 1. Matrix Algebra 1 Matrix and vector notation Definition 1.1 A matrix is a rectangular or square array of numbers of variables. We use uppercase boldface

More information

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p Math Bootcamp 2012 1 Review of matrix algebra 1.1 Vectors and rules of operations An p-dimensional vector is p numbers put together. Written as x 1 x =. x p. When p = 1, this represents a point in the

More information

Linear Algebra Formulas. Ben Lee

Linear Algebra Formulas. Ben Lee Linear Algebra Formulas Ben Lee January 27, 2016 Definitions and Terms Diagonal: Diagonal of matrix A is a collection of entries A ij where i = j. Diagonal Matrix: A matrix (usually square), where entries

More information

STAT200C: Review of Linear Algebra

STAT200C: Review of Linear Algebra Stat200C Instructor: Zhaoxia Yu STAT200C: Review of Linear Algebra 1 Review of Linear Algebra 1.1 Vector Spaces, Rank, Trace, and Linear Equations 1.1.1 Rank and Vector Spaces Definition A vector whose

More information

EE731 Lecture Notes: Matrix Computations for Signal Processing

EE731 Lecture Notes: Matrix Computations for Signal Processing EE731 Lecture Notes: Matrix Computations for Signal Processing James P. Reilly c Department of Electrical and Computer Engineering McMaster University September 22, 2005 0 Preface This collection of ten

More information

Knowledge Discovery and Data Mining 1 (VO) ( )

Knowledge Discovery and Data Mining 1 (VO) ( ) Knowledge Discovery and Data Mining 1 (VO) (707.003) Review of Linear Algebra Denis Helic KTI, TU Graz Oct 9, 2014 Denis Helic (KTI, TU Graz) KDDM1 Oct 9, 2014 1 / 74 Big picture: KDDM Probability Theory

More information

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0. Matrices Operations Linear Algebra Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0 The rectangular array 1 2 1 4 3 4 2 6 1 3 2 1 in which the

More information

Math Camp Lecture 4: Linear Algebra. Xiao Yu Wang. Aug 2010 MIT. Xiao Yu Wang (MIT) Math Camp /10 1 / 88

Math Camp Lecture 4: Linear Algebra. Xiao Yu Wang. Aug 2010 MIT. Xiao Yu Wang (MIT) Math Camp /10 1 / 88 Math Camp 2010 Lecture 4: Linear Algebra Xiao Yu Wang MIT Aug 2010 Xiao Yu Wang (MIT) Math Camp 2010 08/10 1 / 88 Linear Algebra Game Plan Vector Spaces Linear Transformations and Matrices Determinant

More information

MATH 240 Spring, Chapter 1: Linear Equations and Matrices

MATH 240 Spring, Chapter 1: Linear Equations and Matrices MATH 240 Spring, 2006 Chapter Summaries for Kolman / Hill, Elementary Linear Algebra, 8th Ed. Sections 1.1 1.6, 2.1 2.2, 3.2 3.8, 4.3 4.5, 5.1 5.3, 5.5, 6.1 6.5, 7.1 7.2, 7.4 DEFINITIONS Chapter 1: Linear

More information

Foundations of Matrix Analysis

Foundations of Matrix Analysis 1 Foundations of Matrix Analysis In this chapter we recall the basic elements of linear algebra which will be employed in the remainder of the text For most of the proofs as well as for the details, the

More information

Lecture 1 Review: Linear models have the form (in matrix notation) Y = Xβ + ε,

Lecture 1 Review: Linear models have the form (in matrix notation) Y = Xβ + ε, 2. REVIEW OF LINEAR ALGEBRA 1 Lecture 1 Review: Linear models have the form (in matrix notation) Y = Xβ + ε, where Y n 1 response vector and X n p is the model matrix (or design matrix ) with one row for

More information

Properties of Matrices and Operations on Matrices

Properties of Matrices and Operations on Matrices Properties of Matrices and Operations on Matrices A common data structure for statistical analysis is a rectangular array or matris. Rows represent individual observational units, or just observations,

More information

Math Linear Algebra Final Exam Review Sheet

Math Linear Algebra Final Exam Review Sheet Math 15-1 Linear Algebra Final Exam Review Sheet Vector Operations Vector addition is a component-wise operation. Two vectors v and w may be added together as long as they contain the same number n of

More information

Linear Algebra. Christos Michalopoulos. September 24, NTU, Department of Economics

Linear Algebra. Christos Michalopoulos. September 24, NTU, Department of Economics Linear Algebra Christos Michalopoulos NTU, Department of Economics September 24, 2011 Christos Michalopoulos Linear Algebra September 24, 2011 1 / 93 Linear Equations Denition A linear equation in n-variables

More information

CS 246 Review of Linear Algebra 01/17/19

CS 246 Review of Linear Algebra 01/17/19 1 Linear algebra In this section we will discuss vectors and matrices. We denote the (i, j)th entry of a matrix A as A ij, and the ith entry of a vector as v i. 1.1 Vectors and vector operations A vector

More information

Math 102, Winter Final Exam Review. Chapter 1. Matrices and Gaussian Elimination

Math 102, Winter Final Exam Review. Chapter 1. Matrices and Gaussian Elimination Math 0, Winter 07 Final Exam Review Chapter. Matrices and Gaussian Elimination { x + x =,. Different forms of a system of linear equations. Example: The x + 4x = 4. [ ] [ ] [ ] vector form (or the column

More information

Equality: Two matrices A and B are equal, i.e., A = B if A and B have the same order and the entries of A and B are the same.

Equality: Two matrices A and B are equal, i.e., A = B if A and B have the same order and the entries of A and B are the same. Introduction Matrix Operations Matrix: An m n matrix A is an m-by-n array of scalars from a field (for example real numbers) of the form a a a n a a a n A a m a m a mn The order (or size) of A is m n (read

More information

Linear Algebra Highlights

Linear Algebra Highlights Linear Algebra Highlights Chapter 1 A linear equation in n variables is of the form a 1 x 1 + a 2 x 2 + + a n x n. We can have m equations in n variables, a system of linear equations, which we want to

More information

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2 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

More information

Fundamentals of Engineering Analysis (650163)

Fundamentals of Engineering Analysis (650163) Philadelphia University Faculty of Engineering Communications and Electronics Engineering Fundamentals of Engineering Analysis (6563) Part Dr. Omar R Daoud Matrices: Introduction DEFINITION A matrix is

More information

Math Camp II. Basic Linear Algebra. Yiqing Xu. Aug 26, 2014 MIT

Math Camp II. Basic Linear Algebra. Yiqing Xu. Aug 26, 2014 MIT Math Camp II Basic Linear Algebra Yiqing Xu MIT Aug 26, 2014 1 Solving Systems of Linear Equations 2 Vectors and Vector Spaces 3 Matrices 4 Least Squares Systems of Linear Equations Definition A linear

More information

Section 3.3. Matrix Rank and the Inverse of a Full Rank Matrix

Section 3.3. Matrix Rank and the Inverse of a Full Rank Matrix 3.3. Matrix Rank and the Inverse of a Full Rank Matrix 1 Section 3.3. Matrix Rank and the Inverse of a Full Rank Matrix Note. The lengthy section (21 pages in the text) gives a thorough study of the rank

More information

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017 Math 4A Notes Written by Victoria Kala vtkala@math.ucsb.edu Last updated June 11, 2017 Systems of Linear Equations A linear equation is an equation that can be written in the form a 1 x 1 + a 2 x 2 +...

More information

Problem Set (T) If A is an m n matrix, B is an n p matrix and D is a p s matrix, then show

Problem Set (T) If A is an m n matrix, B is an n p matrix and D is a p s matrix, then show MTH 0: Linear Algebra Department of Mathematics and Statistics Indian Institute of Technology - Kanpur Problem Set Problems marked (T) are for discussions in Tutorial sessions (T) If A is an m n matrix,

More information

Linear Algebra Primer

Linear Algebra Primer Linear Algebra Primer David Doria daviddoria@gmail.com Wednesday 3 rd December, 2008 Contents Why is it called Linear Algebra? 4 2 What is a Matrix? 4 2. Input and Output.....................................

More information

Recall the convention that, for us, all vectors are column vectors.

Recall the convention that, for us, all vectors are column vectors. Some linear algebra Recall the convention that, for us, all vectors are column vectors. 1. Symmetric matrices Let A be a real matrix. Recall that a complex number λ is an eigenvalue of A if there exists

More information

Math113: Linear Algebra. Beifang Chen

Math113: Linear Algebra. Beifang Chen Math3: Linear Algebra Beifang Chen Spring 26 Contents Systems of Linear Equations 3 Systems of Linear Equations 3 Linear Systems 3 2 Geometric Interpretation 3 3 Matrices of Linear Systems 4 4 Elementary

More information

1. General Vector Spaces

1. General Vector Spaces 1.1. Vector space axioms. 1. General Vector Spaces Definition 1.1. Let V be a nonempty set of objects on which the operations of addition and scalar multiplication are defined. By addition we mean a rule

More information

Jim Lambers MAT 610 Summer Session Lecture 1 Notes

Jim Lambers MAT 610 Summer Session Lecture 1 Notes Jim Lambers MAT 60 Summer Session 2009-0 Lecture Notes Introduction This course is about numerical linear algebra, which is the study of the approximate solution of fundamental problems from linear algebra

More information

Systems of Linear Equations and Matrices

Systems of Linear Equations and Matrices Chapter 1 Systems of Linear Equations and Matrices System of linear algebraic equations and their solution constitute one of the major topics studied in the course known as linear algebra. In the first

More information

Digital Workbook for GRA 6035 Mathematics

Digital Workbook for GRA 6035 Mathematics Eivind Eriksen Digital Workbook for GRA 6035 Mathematics November 10, 2014 BI Norwegian Business School Contents Part I Lectures in GRA6035 Mathematics 1 Linear Systems and Gaussian Elimination........................

More information

Introduction to Matrix Algebra

Introduction to Matrix Algebra Introduction to Matrix Algebra August 18, 2010 1 Vectors 1.1 Notations A p-dimensional vector is p numbers put together. Written as x 1 x =. x p. When p = 1, this represents a point in the line. When p

More information

Matrices A brief introduction

Matrices A brief introduction Matrices A brief introduction Basilio Bona DAUIN Politecnico di Torino Semester 1, 2014-15 B. Bona (DAUIN) Matrices Semester 1, 2014-15 1 / 41 Definitions Definition A matrix is a set of N real or complex

More information

2. Linear algebra. matrices and vectors. linear equations. range and nullspace of matrices. function of vectors, gradient and Hessian

2. Linear algebra. matrices and vectors. linear equations. range and nullspace of matrices. function of vectors, gradient and Hessian FE661 - Statistical Methods for Financial Engineering 2. Linear algebra Jitkomut Songsiri matrices and vectors linear equations range and nullspace of matrices function of vectors, gradient and Hessian

More information

Systems of Linear Equations and Matrices

Systems of Linear Equations and Matrices Chapter 1 Systems of Linear Equations and Matrices System of linear algebraic equations and their solution constitute one of the major topics studied in the course known as linear algebra. In the first

More information

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations Chapter 1: Systems of linear equations and matrices Section 1.1: Introduction to systems of linear equations Definition: A linear equation in n variables can be expressed in the form a 1 x 1 + a 2 x 2

More information

MATRIX ALGEBRA. or x = (x 1,..., x n ) R n. y 1 y 2. x 2. x m. y m. y = cos θ 1 = x 1 L x. sin θ 1 = x 2. cos θ 2 = y 1 L y.

MATRIX ALGEBRA. or x = (x 1,..., x n ) R n. y 1 y 2. x 2. x m. y m. y = cos θ 1 = x 1 L x. sin θ 1 = x 2. cos θ 2 = y 1 L y. as Basics Vectors MATRIX ALGEBRA An array of n real numbers x, x,, x n is called a vector and it is written x = x x n or x = x,, x n R n prime operation=transposing a column to a row Basic vector operations

More information

Introduction to Quantitative Techniques for MSc Programmes SCHOOL OF ECONOMICS, MATHEMATICS AND STATISTICS MALET STREET LONDON WC1E 7HX

Introduction to Quantitative Techniques for MSc Programmes SCHOOL OF ECONOMICS, MATHEMATICS AND STATISTICS MALET STREET LONDON WC1E 7HX Introduction to Quantitative Techniques for MSc Programmes SCHOOL OF ECONOMICS, MATHEMATICS AND STATISTICS MALET STREET LONDON WC1E 7HX September 2007 MSc Sep Intro QT 1 Who are these course for? The September

More information

NOTES on LINEAR ALGEBRA 1

NOTES on LINEAR ALGEBRA 1 School of Economics, Management and Statistics University of Bologna Academic Year 207/8 NOTES on LINEAR ALGEBRA for the students of Stats and Maths This is a modified version of the notes by Prof Laura

More information

A matrix over a field F is a rectangular array of elements from F. The symbol

A matrix over a field F is a rectangular array of elements from F. The symbol Chapter MATRICES Matrix arithmetic A matrix over a field F is a rectangular array of elements from F The symbol M m n (F ) denotes the collection of all m n matrices over F Matrices will usually be denoted

More information

Preliminary Linear Algebra 1. Copyright c 2012 Dan Nettleton (Iowa State University) Statistics / 100

Preliminary Linear Algebra 1. Copyright c 2012 Dan Nettleton (Iowa State University) Statistics / 100 Preliminary Linear Algebra 1 Copyright c 2012 Dan Nettleton (Iowa State University) Statistics 611 1 / 100 Notation for all there exists such that therefore because end of proof (QED) Copyright c 2012

More information

Linear Algebra M1 - FIB. Contents: 5. Matrices, systems of linear equations and determinants 6. Vector space 7. Linear maps 8.

Linear Algebra M1 - FIB. Contents: 5. Matrices, systems of linear equations and determinants 6. Vector space 7. Linear maps 8. Linear Algebra M1 - FIB Contents: 5 Matrices, systems of linear equations and determinants 6 Vector space 7 Linear maps 8 Diagonalization Anna de Mier Montserrat Maureso Dept Matemàtica Aplicada II Translation:

More information

MATH36001 Generalized Inverses and the SVD 2015

MATH36001 Generalized Inverses and the SVD 2015 MATH36001 Generalized Inverses and the SVD 201 1 Generalized Inverses of Matrices A matrix has an inverse only if it is square and nonsingular. However there are theoretical and practical applications

More information

Matrices and Determinants

Matrices and Determinants Chapter1 Matrices and Determinants 11 INTRODUCTION Matrix means an arrangement or array Matrices (plural of matrix) were introduced by Cayley in 1860 A matrix A is rectangular array of m n numbers (or

More information

Quick Tour of Linear Algebra and Graph Theory

Quick Tour of Linear Algebra and Graph Theory Quick Tour of Linear Algebra and Graph Theory CS224W: Social and Information Network Analysis Fall 2014 David Hallac Based on Peter Lofgren, Yu Wayne Wu, and Borja Pelato s previous versions Matrices and

More information

A Quick Tour of Linear Algebra and Optimization for Machine Learning

A Quick Tour of Linear Algebra and Optimization for Machine Learning A Quick Tour of Linear Algebra and Optimization for Machine Learning Masoud Farivar January 8, 2015 1 / 28 Outline of Part I: Review of Basic Linear Algebra Matrices and Vectors Matrix Multiplication Operators

More information

Chapter 3. Matrices. 3.1 Matrices

Chapter 3. Matrices. 3.1 Matrices 40 Chapter 3 Matrices 3.1 Matrices Definition 3.1 Matrix) A matrix A is a rectangular array of m n real numbers {a ij } written as a 11 a 12 a 1n a 21 a 22 a 2n A =.... a m1 a m2 a mn The array has m rows

More information

Review of Linear Algebra

Review of Linear Algebra Review of Linear Algebra Definitions An m n (read "m by n") matrix, is a rectangular array of entries, where m is the number of rows and n the number of columns. 2 Definitions (Con t) A is square if m=

More information

MAT 2037 LINEAR ALGEBRA I web:

MAT 2037 LINEAR ALGEBRA I web: MAT 237 LINEAR ALGEBRA I 2625 Dokuz Eylül University, Faculty of Science, Department of Mathematics web: Instructor: Engin Mermut http://kisideuedutr/enginmermut/ HOMEWORK 2 MATRIX ALGEBRA Textbook: Linear

More information

Massachusetts Institute of Technology Department of Economics Statistics. Lecture Notes on Matrix Algebra

Massachusetts Institute of Technology Department of Economics Statistics. Lecture Notes on Matrix Algebra Massachusetts Institute of Technology Department of Economics 14.381 Statistics Guido Kuersteiner Lecture Notes on Matrix Algebra These lecture notes summarize some basic results on matrix algebra used

More information

Online Exercises for Linear Algebra XM511

Online Exercises for Linear Algebra XM511 This document lists the online exercises for XM511. The section ( ) numbers refer to the textbook. TYPE I are True/False. Lecture 02 ( 1.1) Online Exercises for Linear Algebra XM511 1) The matrix [3 2

More information

OHSx XM511 Linear Algebra: Solutions to Online True/False Exercises

OHSx XM511 Linear Algebra: Solutions to Online True/False Exercises This document gives the solutions to all of the online exercises for OHSx XM511. The section ( ) numbers refer to the textbook. TYPE I are True/False. Answers are in square brackets [. Lecture 02 ( 1.1)

More information

ELEMENTS OF MATRIX ALGEBRA

ELEMENTS OF MATRIX ALGEBRA ELEMENTS OF MATRIX ALGEBRA CHUNG-MING KUAN Department of Finance National Taiwan University September 09, 2009 c Chung-Ming Kuan, 1996, 2001, 2009 E-mail: ckuan@ntuedutw; URL: homepagentuedutw/ ckuan CONTENTS

More information

Linear Algebra March 16, 2019

Linear Algebra March 16, 2019 Linear Algebra March 16, 2019 2 Contents 0.1 Notation................................ 4 1 Systems of linear equations, and matrices 5 1.1 Systems of linear equations..................... 5 1.2 Augmented

More information

Linear Algebra Review

Linear Algebra Review Linear Algebra Review Contents 1 Basic Concepts and Notations 2 2 Matrix Operations and Properties 3 21 Matrix Multiplication 3 211 Vector-Vector Products 3 212 Matrix-Vector Products 4 213 Matrix-Matrix

More information

Finite Mathematics Chapter 2. where a, b, c, d, h, and k are real numbers and neither a and b nor c and d are both zero.

Finite Mathematics Chapter 2. where a, b, c, d, h, and k are real numbers and neither a and b nor c and d are both zero. Finite Mathematics Chapter 2 Section 2.1 Systems of Linear Equations: An Introduction Systems of Equations Recall that a system of two linear equations in two variables may be written in the general form

More information

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences)

AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences) AMS526: Numerical Analysis I (Numerical Linear Algebra for Computational and Data Sciences) Lecture 1: Course Overview; Matrix Multiplication Xiangmin Jiao Stony Brook University Xiangmin Jiao Numerical

More information

Section 3.2. Multiplication of Matrices and Multiplication of Vectors and Matrices

Section 3.2. Multiplication of Matrices and Multiplication of Vectors and Matrices 3.2. Multiplication of Matrices and Multiplication of Vectors and Matrices 1 Section 3.2. Multiplication of Matrices and Multiplication of Vectors and Matrices Note. In this section, we define the product

More information

MATH 106 LINEAR ALGEBRA LECTURE NOTES

MATH 106 LINEAR ALGEBRA LECTURE NOTES MATH 6 LINEAR ALGEBRA LECTURE NOTES FALL - These Lecture Notes are not in a final form being still subject of improvement Contents Systems of linear equations and matrices 5 Introduction to systems of

More information

Graduate Mathematical Economics Lecture 1

Graduate Mathematical Economics Lecture 1 Graduate Mathematical Economics Lecture 1 Yu Ren WISE, Xiamen University September 23, 2012 Outline 1 2 Course Outline ematical techniques used in graduate level economics courses Mathematics for Economists

More information

3 Matrix Algebra. 3.1 Operations on matrices

3 Matrix Algebra. 3.1 Operations on matrices 3 Matrix Algebra A matrix is a rectangular array of numbers; it is of size m n if it has m rows and n columns. A 1 n matrix is a row vector; an m 1 matrix is a column vector. For example: 1 5 3 5 3 5 8

More information

Chapter 4 - MATRIX ALGEBRA. ... a 2j... a 2n. a i1 a i2... a ij... a in

Chapter 4 - MATRIX ALGEBRA. ... a 2j... a 2n. a i1 a i2... a ij... a in Chapter 4 - MATRIX ALGEBRA 4.1. Matrix Operations A a 11 a 12... a 1j... a 1n a 21. a 22.... a 2j... a 2n. a i1 a i2... a ij... a in... a m1 a m2... a mj... a mn The entry in the ith row and the jth column

More information

Matrix & Linear Algebra

Matrix & Linear Algebra Matrix & Linear Algebra Jamie Monogan University of Georgia For more information: http://monogan.myweb.uga.edu/teaching/mm/ Jamie Monogan (UGA) Matrix & Linear Algebra 1 / 84 Vectors Vectors Vector: A

More information

Conceptual Questions for Review

Conceptual Questions for Review Conceptual Questions for Review Chapter 1 1.1 Which vectors are linear combinations of v = (3, 1) and w = (4, 3)? 1.2 Compare the dot product of v = (3, 1) and w = (4, 3) to the product of their lengths.

More information

Phys 201. Matrices and Determinants

Phys 201. Matrices and Determinants Phys 201 Matrices and Determinants 1 1.1 Matrices 1.2 Operations of matrices 1.3 Types of matrices 1.4 Properties of matrices 1.5 Determinants 1.6 Inverse of a 3 3 matrix 2 1.1 Matrices A 2 3 7 =! " 1

More information

G1110 & 852G1 Numerical Linear Algebra

G1110 & 852G1 Numerical Linear Algebra The University of Sussex Department of Mathematics G & 85G Numerical Linear Algebra Lecture Notes Autumn Term Kerstin Hesse (w aw S w a w w (w aw H(wa = (w aw + w Figure : Geometric explanation of the

More information

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB Glossary of Linear Algebra Terms Basis (for a subspace) A linearly independent set of vectors that spans the space Basic Variable A variable in a linear system that corresponds to a pivot column in the

More information

ANSWERS (5 points) Let A be a 2 2 matrix such that A =. Compute A. 2

ANSWERS (5 points) Let A be a 2 2 matrix such that A =. Compute A. 2 MATH 7- Final Exam Sample Problems Spring 7 ANSWERS ) ) ). 5 points) Let A be a matrix such that A =. Compute A. ) A = A ) = ) = ). 5 points) State ) the definition of norm, ) the Cauchy-Schwartz inequality

More information

Lecture Summaries for Linear Algebra M51A

Lecture Summaries for Linear Algebra M51A These lecture summaries may also be viewed online by clicking the L icon at the top right of any lecture screen. Lecture Summaries for Linear Algebra M51A refers to the section in the textbook. Lecture

More information

Notes on Linear Algebra

Notes on Linear Algebra 1 Notes on Linear Algebra Jean Walrand August 2005 I INTRODUCTION Linear Algebra is the theory of linear transformations Applications abound in estimation control and Markov chains You should be familiar

More information

2. Every linear system with the same number of equations as unknowns has a unique solution.

2. Every linear system with the same number of equations as unknowns has a unique solution. 1. For matrices A, B, C, A + B = A + C if and only if A = B. 2. Every linear system with the same number of equations as unknowns has a unique solution. 3. Every linear system with the same number of equations

More information

B553 Lecture 5: Matrix Algebra Review

B553 Lecture 5: Matrix Algebra Review B553 Lecture 5: Matrix Algebra Review Kris Hauser January 19, 2012 We have seen in prior lectures how vectors represent points in R n and gradients of functions. Matrices represent linear transformations

More information

2. Matrix Algebra and Random Vectors

2. Matrix Algebra and Random Vectors 2. Matrix Algebra and Random Vectors 2.1 Introduction Multivariate data can be conveniently display as array of numbers. In general, a rectangular array of numbers with, for instance, n rows and p columns

More information

Introduction. Vectors and Matrices. Vectors [1] Vectors [2]

Introduction. Vectors and Matrices. Vectors [1] Vectors [2] Introduction Vectors and Matrices Dr. TGI Fernando 1 2 Data is frequently arranged in arrays, that is, sets whose elements are indexed by one or more subscripts. Vector - one dimensional array Matrix -

More information

Undergraduate Mathematical Economics Lecture 1

Undergraduate Mathematical Economics Lecture 1 Undergraduate Mathematical Economics Lecture 1 Yu Ren WISE, Xiamen University September 15, 2014 Outline 1 Courses Description and Requirement 2 Course Outline ematical techniques used in economics courses

More information

ELEMENTARY LINEAR ALGEBRA

ELEMENTARY LINEAR ALGEBRA ELEMENTARY LINEAR ALGEBRA K R MATTHEWS DEPARTMENT OF MATHEMATICS UNIVERSITY OF QUEENSLAND First Printing, 99 Chapter LINEAR EQUATIONS Introduction to linear equations A linear equation in n unknowns x,

More information

NOTES FOR LINEAR ALGEBRA 133

NOTES FOR LINEAR ALGEBRA 133 NOTES FOR LINEAR ALGEBRA 33 William J Anderson McGill University These are not official notes for Math 33 identical to the notes projected in class They are intended for Anderson s section 4, and are 2

More information

Quick Tour of Linear Algebra and Graph Theory

Quick Tour of Linear Algebra and Graph Theory Quick Tour of Linear Algebra and Graph Theory CS224w: Social and Information Network Analysis Fall 2012 Yu Wayne Wu Based on Borja Pelato s version in Fall 2011 Matrices and Vectors Matrix: A rectangular

More information

MAT 610: Numerical Linear Algebra. James V. Lambers

MAT 610: Numerical Linear Algebra. James V. Lambers MAT 610: Numerical Linear Algebra James V Lambers January 16, 2017 2 Contents 1 Matrix Multiplication Problems 7 11 Introduction 7 111 Systems of Linear Equations 7 112 The Eigenvalue Problem 8 12 Basic

More information

Taxonomy of n n Matrices. Complex. Integer. Real. diagonalizable. Real. Doubly stochastic. Unimodular. Invertible. Permutation. Orthogonal.

Taxonomy of n n Matrices. Complex. Integer. Real. diagonalizable. Real. Doubly stochastic. Unimodular. Invertible. Permutation. Orthogonal. Doubly stochastic Taxonomy of n n Matrices Each rectangle represents one class of complex n n matrices. Arrows indicate subset relations. Classes in green are closed under multiplication. Classes in blue

More information

SUMMARY OF MATH 1600

SUMMARY OF MATH 1600 SUMMARY OF MATH 1600 Note: The following list is intended as a study guide for the final exam. It is a continuation of the study guide for the midterm. It does not claim to be a comprehensive list. You

More information

Introduction to Numerical Linear Algebra II

Introduction to Numerical Linear Algebra II Introduction to Numerical Linear Algebra II Petros Drineas These slides were prepared by Ilse Ipsen for the 2015 Gene Golub SIAM Summer School on RandNLA 1 / 49 Overview We will cover this material in

More information

Matrices A brief introduction

Matrices A brief introduction Matrices A brief introduction Basilio Bona DAUIN Politecnico di Torino Semester 1, 2014-15 B. Bona (DAUIN) Matrices Semester 1, 2014-15 1 / 44 Definitions Definition A matrix is a set of N real or complex

More information

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET This is a (not quite comprehensive) list of definitions and theorems given in Math 1553. Pay particular attention to the ones in red. Study Tip For each

More information

3 (Maths) Linear Algebra

3 (Maths) Linear Algebra 3 (Maths) Linear Algebra References: Simon and Blume, chapters 6 to 11, 16 and 23; Pemberton and Rau, chapters 11 to 13 and 25; Sundaram, sections 1.3 and 1.5. The methods and concepts of linear algebra

More information

Notes on Mathematics

Notes on Mathematics Notes on Mathematics - 12 1 Peeyush Chandra, A. K. Lal, V. Raghavendra, G. Santhanam 1 Supported by a grant from MHRD 2 Contents I Linear Algebra 7 1 Matrices 9 1.1 Definition of a Matrix......................................

More information

Chapter 7. Linear Algebra: Matrices, Vectors,

Chapter 7. Linear Algebra: Matrices, Vectors, Chapter 7. Linear Algebra: Matrices, Vectors, Determinants. Linear Systems Linear algebra includes the theory and application of linear systems of equations, linear transformations, and eigenvalue problems.

More information

Basic Concepts in Matrix Algebra

Basic Concepts in Matrix Algebra Basic Concepts in Matrix Algebra An column array of p elements is called a vector of dimension p and is written as x p 1 = x 1 x 2. x p. The transpose of the column vector x p 1 is row vector x = [x 1

More information

c c c c c c c c c c a 3x3 matrix C= has a determinant determined by

c c c c c c c c c c a 3x3 matrix C= has a determinant determined by Linear Algebra Determinants and Eigenvalues Introduction: Many important geometric and algebraic properties of square matrices are associated with a single real number revealed by what s known as the determinant.

More information

Lecture Notes to be used in conjunction with. 233 Computational Techniques

Lecture Notes to be used in conjunction with. 233 Computational Techniques Lecture Notes to be used in conjunction with 233 Computational Techniques István Maros Department of Computing Imperial College London V29e January 2008 CONTENTS i Contents 1 Introduction 1 2 Computation

More information

Review problems for MA 54, Fall 2004.

Review problems for MA 54, Fall 2004. Review problems for MA 54, Fall 2004. Below are the review problems for the final. They are mostly homework problems, or very similar. If you are comfortable doing these problems, you should be fine on

More information

MAT Linear Algebra Collection of sample exams

MAT Linear Algebra Collection of sample exams MAT 342 - Linear Algebra Collection of sample exams A-x. (0 pts Give the precise definition of the row echelon form. 2. ( 0 pts After performing row reductions on the augmented matrix for a certain system

More information

Chapter 2: Matrices and Linear Systems

Chapter 2: Matrices and Linear Systems Chapter 2: Matrices and Linear Systems Paul Pearson Outline Matrices Linear systems Row operations Inverses Determinants Matrices Definition An m n matrix A = (a ij ) is a rectangular array of real numbers

More information

Elementary maths for GMT

Elementary maths for GMT Elementary maths for GMT Linear Algebra Part 2: Matrices, Elimination and Determinant m n matrices The system of m linear equations in n variables x 1, x 2,, x n a 11 x 1 + a 12 x 2 + + a 1n x n = b 1

More information

Linear Algebra in Actuarial Science: Slides to the lecture

Linear Algebra in Actuarial Science: Slides to the lecture Linear Algebra in Actuarial Science: Slides to the lecture Fall Semester 2010/2011 Linear Algebra is a Tool-Box Linear Equation Systems Discretization of differential equations: solving linear equations

More information

MATH 220 FINAL EXAMINATION December 13, Name ID # Section #

MATH 220 FINAL EXAMINATION December 13, Name ID # Section # MATH 22 FINAL EXAMINATION December 3, 2 Name ID # Section # There are??multiple choice questions. Each problem is worth 5 points. Four possible answers are given for each problem, only one of which is

More information

SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to Linear Algebra

SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to Linear Algebra 1.1. Introduction SAMPLE OF THE STUDY MATERIAL PART OF CHAPTER 1 Introduction to Linear algebra is a specific branch of mathematics dealing with the study of vectors, vector spaces with functions that

More information

MATH2210 Notebook 2 Spring 2018

MATH2210 Notebook 2 Spring 2018 MATH2210 Notebook 2 Spring 2018 prepared by Professor Jenny Baglivo c Copyright 2009 2018 by Jenny A. Baglivo. All Rights Reserved. 2 MATH2210 Notebook 2 3 2.1 Matrices and Their Operations................................

More information

Introduction to Matrices

Introduction to Matrices 214 Analysis and Design of Feedback Control Systems Introduction to Matrices Derek Rowell October 2002 Modern system dynamics is based upon a matrix representation of the dynamic equations governing the

More information

Linear Algebra: Matrix Eigenvalue Problems

Linear Algebra: Matrix Eigenvalue Problems CHAPTER8 Linear Algebra: Matrix Eigenvalue Problems Chapter 8 p1 A matrix eigenvalue problem considers the vector equation (1) Ax = λx. 8.0 Linear Algebra: Matrix Eigenvalue Problems Here A is a given

More information