04/09/2018 Linear algebra A brush-up course Jeff Hindsborg 04/09/2018 2 Agenda 1. Real numbers • Operators • Linear equations 2. Linear algebra 3. Systems of Linear equations 04/09/2018 3 Real numbers • The real number system consists of 4 parts: A set of R of all real numbers • A relation < on R. If a, b ∈ R, then a < b is either true or false. We know it as the order-relation. • A function + : R + R ≠ R . The addition operation • A function ∘ ∘ ∘ ∘ : R ∘ R ≠ R . The multiplication operation 1
04/09/2018 04/09/2018 4 Real numbers - Overview • R : Real numbers • Q : Rational numbers • Z : Integers • N : natural numbers Does that cover all real numbers? Is everything real numbers? 04/09/2018 5 Real numbers - Axioms I • Associative laws • a + ( b + c ) = ( a + b ) + c • a ∘ ( b ∘ c ) = ( a ∘ b ) ∘ c • Commutative laws • a + b = b + a • a ∘ b = b ∘ a • Distributive law • a ∘ ( b + c ) = a ∘ b + a ∘ c 04/09/2018 6 Real numbers - Axioms II • Additive identity (”zero” element) • There exist an element in R called 0 so that, for all a: • a + 0 = a • Additive inverse • For all a there exists a b so that: • a + b = 0, and b = − a • Multiplicative identity (”one” element) • There exists an element in R called 1 so that, for all a : • 1 ∘ a = a • Multiplicative inverse • For all a ≠ 0 there exists a b so that: • a ∘ b = 1, and b = a -1 2
04/09/2018 04/09/2018 7 Real numbers - Solving equations • Let a ≠ 0 and b be known real numbers, and x be an unknown real number. • If, for some reason, we know that • � ∙ � � � we say that we have an equation. • We can solve the equation in a couple of stages using the axioms: � ∙ � � �, � ∙ � �� ∙ � � � �� ∙ � 1 ∙ � � � �� ∙ � � � � �� � 04/09/2018 8 Real numbers - Example Farmer Hansen has delivered milk to the dairy last week. • He delivered 10.000kg • He has received a total of 23.000 DKK as payment. Using these 2 figures, we can find the milk-price per quantity. (eq. 1) � ∙ � � � Where: � � 10.000 �� • � � 23.000 ��� • � � ���� ����� ������ �! • " We saw that solving eq. 1 w.r.t. � yields � � # , such that $%% � ().*** $%% � +. ,- $%% � • &' �*.*** &' &' 04/09/2018 9 Agenda 1. Real numbers 2. Linear algebra 1. Background 2. What is a matrix? 3. Types of matrices 4. Operations 5. Where and why do we use it? 3. Systems of Linear equations 3
04/09/2018 04/09/2018 10 Linear algebra - background • We saw that a linear equation (eq. 1) could be expressed as �� � � • We can generalize that to � � � � . � ( � ( . ⋯ . � 0 � 0 � � , for n=1,2,3,…,n Where � and the � ’ s are (real numbers) coefficients that are often known in advance. In this course we focus on linear equations. 04/09/2018 11 Linear algebra � � � � . � ( � ( . ⋯ . � 0 � 0 � � - background Class exercise 1 Reorder the following equations into the generalized form I. 3� � . 5� ( . 2 � � � II. 4� � . 5� ( � � � � ( III. � ( � 2 6 5 � � . � ) IV. � ( � 2 � � 5 6 When finished, we’ll discuss the results. 04/09/2018 13 Agenda 1. Real numbers 2. Linear algebra 1. Background 2. What is a matrix? 3. Types of matrices 4. Operations 5. Where and why do we use it? 3. Systems of Linear equations 4
04/09/2018 04/09/2018 14 Linear algebra - What is a matrix? • Consider the system 3� � . 6� ( . 2� ) � 0 51� � . 5� ( . 23� ) � 0 52� ( . 4� ) � 0 • We can align its coefficients in columns to form the matrix 3 6 2 51 5 23 0 52 4 Which is a 3x3 matrix ( Notation: #?� @ A #B�����@ ) 04/09/2018 15 Linear algebra - What is a matrix? • Another example 3 6 2 51 5 23 Which is a 2x3 matrix. Symbolically we can express this as � �� � �( � �) � (� � (( � () Similar to the generalized equation, only that the first index denotes the equation. � � � � . � ( � ( . ⋯ . � 0 � 0 � � 04/09/2018 16 Agenda 1. Real numbers 2. Linear algebra 1. Background 2. What is a matrix? 3. Types of matrices 4. Operations 5. Where and why do we use it? 3. Systems of Linear equations 5
04/09/2018 04/09/2018 17 Linear algebra - Types of matrices A matrix � of dimension � A � is called a quadratic (or rectangular) matrix: A matrix � of dimension 1 A � is called a row vector: A matrix � of dimension � A 1 is called a column vector 04/09/2018 18 Agenda 1. Real numbers 2. Linear algebra 1. Background 2. What is a matrix? 3. Types of matrices 4. Operations 5. Where and why do we use it? 3. Systems of Linear equations 04/09/2018 19 Linear algebra - Operations Addition - Two matrices may be added if they are of equal dimensions (say � A � ) From the axioms of real numbers, it follows that the commutative law is valid for matrix operation: � . � � � . � 6
04/09/2018 04/09/2018 20 Linear algebra - Operations Class exercise 2 Additive identity Does a set of � A � matrices have a ‘zero’ element 0 so that for any � : � . 0 � � If yes, what does it look like? 04/09/2018 21 Linear algebra - Operations Multiplication - Two matrices ( � and � ) may be multiplied if - � is of dimension � A � - � is of dimension � A � In other words, � must have the same number of columns as � has rows. Resulting in a � A � matrix. E.g. �� A �!�� A �! - Due to the dimension requirement, it is clear that the commutative law is not valid for matrix multiplication: Even when � ∙ � exists, most often � ∙ � C � ∙ � 04/09/2018 22 Linear algebra - Operations Vector multiplication - A row vector � of dimension 1 A � may be multiplied with a column vector b of dimension � A 1 . - The product � ∙ � is a 1 A 1 matrix (a number): The product � ∙ � is a � A � matrix: - 7
04/09/2018 Matrix multiplication – simple example A 3 x 3 matrix multiplied with a 3 x 2 matrix b 5 4 An element in the product is 3 6 calculated as the product of a row and a column 1 2 21 30 2 3 2 15 24 a 1 2 4 22 26 3 2 1 Let’s visualize this: http://matrixmultiplication.xyz/ 04/09/2018 24 Linear algebra - Operations Multiplicative identity Does the set of matrices have a ‘one’ element F � , so that if F � is an � A � matrix, then for any � A � matrix � , F � ∙ � � � If yes: • What must the values of n necessarily be? • What are the elements of F � – what does the matrix look like? Does a ‘one’ element F ( exist such that for any matrix � of given dimension, � ∙ F ( � � If yes: Same questions as before. 04/09/2018 25 Linear algebra - Operations It follows directly from the axioms for real numbers, that every matrix � , has an additive inverse, � , such that � . � � 0 , and, for the additive inverse, b � 5a Resulting in the ‘zero’ or ‘null’ matrix. 8
04/09/2018 04/09/2018 26 Linear algebra - Operations Other operations • A real number � may be multiplied with a matrix • The transpose � G (often denoted as � H or � I ) of a matrix is formed by changing the columns to rows. Visualize it as a folding around the diagonal. 04/09/2018 27 Linear algebra - Operations Other operations – Examples 1 2 If � � 2 and 3 4 then 5 6 1 2 2 4 �� � 2 3 4 � 6 8 5 6 10 12 The transpose of � is, � G � 04/09/2018 28 Linear algebra - Operations Multiplicative inverse I Does every matrix that are non-zero ( � C 0 ) have a multiplicative inverse, � , such that � ∙ � � F If yes, • What does it look like? 9
04/09/2018 04/09/2018 29 Linear algebra - Operations Multiplicative Inverse II A matrix � only has a multiplicative inverse under certain conditions: • The matrix � is quadratic (i.e. its dimension is � A � ) • The matrix is non-singular • � is singular if and only if K�L � � 0 where K�L � is the determinant of � . • Many quadratic matrices are singular! Determinant • The determinant of a quadratic matrix is a real number . • Calculation of the determinant is rather complicated for large dimensions. • The determinant of a 2 x 2 matrix: ns • The determinant of a 3 x 3 matrix: 04/09/2018 31 Linear algebra - Operations The inverse matrix If a quadratic matrix � is non-singular ( det � C 0 ) it has an inverse � �� , and: • �� �� � F • � �� � � F - The inverse is complicated to find for matrices of high dimension. - For large matrices (millions of rows and columns) inversion is a challenge even to modern computers. - Inversion of matrices is crucial to many applications in herd management (and animal breeding) 10
Recommend
More recommend