Elementary maths for GMT

Similar documents
n n matrices The system of m linear equations in n variables x 1, x 2,..., x n can be written as a matrix equation by Ax = b, or in full

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices

Phys 201. Matrices and Determinants

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Matrices. Chapter Definitions and Notations

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

MATRICES. a m,1 a m,n A =

Chapter 2 Notes, Linear Algebra 5e Lay

Section 9.2: Matrices.. a m1 a m2 a mn

Matrix Arithmetic. j=1

Math Linear Algebra Final Exam Review Sheet

Topics. Vectors (column matrices): Vector addition and scalar multiplication The matrix of a linear function y Ax The elements of a matrix A : A ij

MATH2210 Notebook 2 Spring 2018

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 and Matrix Inversion

Section 9.2: Matrices. Definition: A matrix A consists of a rectangular array of numbers, or elements, arranged in m rows and n columns.

Math 60. Rumbos Spring Solutions to Assignment #17

Chapter 7. Linear Algebra: Matrices, Vectors,

Matrix Multiplication

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

MATH 213 Linear Algebra and ODEs Spring 2015 Study Sheet for Midterm Exam. Topics

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.

POLI270 - Linear Algebra

is a 3 4 matrix. It has 3 rows and 4 columns. The first row is the horizontal row [ ]

Things we can already do with matrices. Unit II - Matrix arithmetic. Defining the matrix product. Things that fail in matrix arithmetic

A Review of Matrix Analysis

Matrix & Linear Algebra

Materials engineering Collage \\ Ceramic & construction materials department Numerical Analysis \\Third stage by \\ Dalya Hekmat

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

Review of Basic Concepts in Linear Algebra

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

Linear Systems and Matrices

a11 a A = : a 21 a 22

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

Matrix Algebra. Matrix Algebra. Chapter 8 - S&B

7.6 The Inverse of a Square Matrix

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

We could express the left side as a sum of vectors and obtain the Vector Form of a Linear System: a 12 a x n. a m2

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

ICS 6N Computational Linear Algebra Matrix Algebra

Lemma 8: Suppose the N by N matrix A has the following block upper triangular form:

Basic Concepts in Linear Algebra

Matrices and systems of linear equations

LS.1 Review of Linear Algebra

MATH 315 Linear Algebra Homework #1 Assigned: August 20, 2018

Fundamentals of Engineering Analysis (650163)

Linear Equations and Matrix

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.

Matrix operations Linear Algebra with Computer Science Application

LINEAR SYSTEMS, MATRICES, AND VECTORS

Elementary Row Operations on Matrices

Linear Algebra V = T = ( 4 3 ).

Section 1.1 System of Linear Equations. Dr. Abdulla Eid. College of Science. MATHS 211: Linear Algebra

A FIRST COURSE IN LINEAR ALGEBRA. An Open Text by Ken Kuttler. Matrix Arithmetic

Numerical Analysis Lecture Notes

MATH 2331 Linear Algebra. Section 2.1 Matrix Operations. Definition: A : m n, B : n p. Example: Compute AB, if possible.

PH1105 Lecture Notes on Linear Algebra.

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

ECON 186 Class Notes: Linear Algebra

LECTURES 14/15: LINEAR INDEPENDENCE AND BASES

Chapter 2. Matrix Arithmetic. Chapter 2

CHAPTER 8: Matrices and Determinants

Matrices. 1 a a2 1 b b 2 1 c c π

Matrices: 2.1 Operations with Matrices

Math 3108: Linear Algebra

Linear Algebra. The analysis of many models in the social sciences reduces to the study of systems of equations.

Determinants Chapter 3 of Lay

1 Matrices and Systems of Linear Equations. a 1n a 2n

CLASS 12 ALGEBRA OF MATRICES

Methods for Solving Linear Systems Part 2

Chapter 1 Vector Spaces

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

MTH501- Linear Algebra MCQS MIDTERM EXAMINATION ~ LIBRIANSMINE ~

Linear Equations in Linear Algebra

ORIE 6300 Mathematical Programming I August 25, Recitation 1

Math 240 Calculus III

Introduction to Matrices

CS 246 Review of Linear Algebra 01/17/19

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

Systems of Linear Equations. By: Tri Atmojo Kusmayadi and Mardiyana Mathematics Education Sebelas Maret University

Linear Algebra March 16, 2019

Review of linear algebra

Math 1314 Week #14 Notes

MAC Module 2 Systems of Linear Equations and Matrices II. Learning Objectives. Upon completing this module, you should be able to :

MATH 323 Linear Algebra Lecture 6: Matrix algebra (continued). Determinants.

System of Linear Equations

Jim Lambers MAT 610 Summer Session Lecture 1 Notes

Graphics (INFOGR), , Block IV, lecture 8 Deb Panja. Today: Matrices. Welcome

3.4 Elementary Matrices and Matrix Inverse

INSTITIÚID TEICNEOLAÍOCHTA CHEATHARLACH INSTITUTE OF TECHNOLOGY CARLOW MATRICES

Graduate Mathematical Economics Lecture 1

Undergraduate Mathematical Economics Lecture 1

Components and change of basis

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )

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

3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions

M. Matrices and Linear Algebra

[ Here 21 is the dot product of (3, 1, 2, 5) with (2, 3, 1, 2), and 31 is the dot product of

Review of Linear Algebra

Linear Algebra 1 Exam 1 Solutions 6/12/3

Transcription:

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 a 21 x 1 + a 22 x 2 + + a 2n x n = b 2 a m1 x 1 + a m2 x 2 + + a mn x n = b m can be written as the matrix equation Ax = b, i.e. a 11 a 12 a 1n a 21 a 22 a 2n a m1 a m2 a mn x 1 x 2 x n = b 1 b 2 b n 2

m n matrices The matrix A = a 11 a 12 a 1n a 21 a 22 a 2n a m1 a m2 a mn has m rows and n columns, and is called a m n matrix 3

Special matrices A square matrix (for which m = n) is called diagonal matrix if all elements a ij for which i j are zero If all elements a ii are one, then the matrix is called the identity matrix, denoted with I m depending on the context, the subscript m may be omitted 1 0 0 0 1 0 I = 0 0 1 If all matrix entries are zero, then the matrix is called zero matrix or null matrix, denoted with 0 4

Matrix addition For two matrices A and B, we have A + B = C, with c ij = a ij + b ij For example 1 4 2 5 3 6 + 7 10 8 11 9 12 = 8 14 10 16 12 18 Q: What are the conditions on the dimensions of the matrices A and B? 5

Matrix multiplication Multiplying a matrix with a scalar is defined as follows: ca = B with b ij = ca ij For example 1 2 3 2 4 5 6 7 8 9 = 2 4 6 8 10 12 14 16 18 6

Multiplying two matrices is a bit more involved We have AB = C with c ij = For example Matrix multiplication 6 5 1 3 2 1 8 4 1 0 0 1 1 0 5 0 2 0 1 0 n k=1 a ik b kj = 6 2 2 37 5 16 Q: What are the conditions on the dimensions of the matrices A and B? What are the dimensions of C? 7

Properties of matrix multiplication Matrix multiplication is associative and distributive over addition AB C = A BC A B + C = AB + AC A + B C = AC + BC However, matrix multiplication is not commutative, in general, AB BA Also, if AB = AC, it does not necessarily follow that B = C (even if A is not the zero matrix) 8

Zero and identity matrix The zero matrix 0 has the property that if you add it to another matrix A, you get precisely A again A + 0 = 0 + A = A The identity matrix I has the property that if you multiply it with another matrix A, you get precisely A again AI = IA = A 9

Matrix and 2D linear transformation The matrix multiplication of a 2 2 square matrix and a 2 1 matrix gives a new 2 1 matrix For example 2 0 1 1 1 2 = 2 3 We can interpret a 2 1 matrix as a 2D vector or point; the 2 2 matrix transforms any vector (or point) into another vector (or point) More later... 10

Transposed matrices The transpose A T of a m n matrix A is a n m matrix that is obtained by interchanging the rows and columns of A A = a 11 a 12 a 1n a 21 a 22 a 2n a m1 a m2 a mn, A T = a 11 a 21 a m1 a 12 a 22 a m2 a 1n a m2 a mn 11

Transposed matrices For example A = 1 2 3 4 5 6 A T = 1 4 2 5 3 6 For the transpose of the product of two matrices we have (AB) T = B T A T Note the change of order 12

The dot product revisited If we regard (column) vectors as matrices, we see that the dot product of two vectors can be written as u v = u T v For example 1 2 3 4 5 6 = 1 2 3 4 5 6 = 32 = 32 A 1 1 matrix is simply a number, and the brackets are omitted 13

Inverse matrices The inverse of a matrix A is a matrix A 1 such that AA 1 = I Only square matrices possibly have an inverse Note that the inverse of A 1 is A, so we have AA 1 = A 1 A = I 14

Gaussian elimination Matrices are a convenient way of representing systems of linear equations 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 a m1 x 1 + a m2 x 2 + + a mn x n = b m If such a system has a unique solution, it can be solved with Gaussian elimination 15

Gaussian elimination Permitted rules in Gaussian elimination are Rule 1: Interchanging two rows Rule 2: Multiplying a row with a (non-zero) constant Rule 3: Adding a multiple of another row to a row 16

Gaussian elimination Matrices are not necessary for Gaussian elimination, but very convenient, especially augmented matrices The augmented matrix corresponding to the previous system of equations is a 11 a 12 a 1n a 21 a 22 a 2n a m1 a m2 a mn b 1 b 2 b m 17

Gaussian elimination: example Suppose we want to solve the following system x + y + 2z = 17 2x + y + z = 15 x + 2y + 3z = 26 Q: What is the geometric interpretation of this system? And what is the interpretation of its solution? 18

Gaussian elimination: example By applying the rules in a clever order, we get 1 1 2 2 1 1 1 2 3 17 15 26 1 1 2 R3 R3 2 1 1 15 (3)-(1) (2)-2(1) 0 1 1 17 9 1 1 2 0 1 3 0 1 1 17 19 9 1 1 2 0 1 3 0 1 1 17 19 9 R2 R3-1(2) (3)-(2) 1 1 2 0 1 3 0 0 2 17 19 10 R3 (1)-(2) 1 0 1 0 1 3 0 0 2 2 19 10 1 0 1 0 1 3 0 0 1 2 19 5 1 0 1 R2 R3 R3 0 1 0 4-0.5(3) (2)-3(3) (1)+(3) 0 0 1 2 5 1 0 0 0 1 0 0 0 1 3 4 5 19

Gaussian elimination: example The interpretation of the last augmented matrix 1 0 0 3 0 1 0 4 0 0 1 5 is the very convenient system of linear equations x = 3 y = 4 z = 5 In other words, the point (3, 4, 5) satisfies all three equations 20

Gaussian elimination: interpretation We started with three equations, which are implicit representations of planes x + y + 2z = 17 2x + y + z = 15 x + 2y + 3z = 26 We ended with three other equations, which can also be interpreted as planes x = 3 y = 4 z = 5 The steps in Gaussian elimination preserve the location of the solution 21

Gaussian elimination: outcomes in 3D Since any linear equation in three variables is a plane in 3D, we can interpret the possible outcomes of systems of three equations 1. Three planes intersect in one point: the system has one unique solution 2. Three planes do not have a common intersection: the system has no solution 3. Three planes have a line in common: the system has many solutions The three planes can also coincide, then the equations are equivalent 22

Gaussian elimination: inverting matrices The same procedure can also be used to invert matrices 1 1 2 1 3 4 0 2 5 1 0 0 0 1 0 0 0 1 1 1 2 0 2 2 0 2 5 1 0 0 1 1 0 0 0 1 1 1 2 0 1 1 0 2 5 1 0 0 1 2 1 2 0 0 0 1 1 0 1 0 1 1 0 0 3 3 2 1 2 0 1 2 1 2 0 1 1 1 1 0 1 0 1 1 0 0 1 3 2 1 2 0 1 2 1 2 0 1 3 1 3 1 3 1 0 0 0 1 0 0 0 1 7 6 1 6 2 6 5 6 5 6 2 6 2 6 2 6 2 6 23

Gaussian elimination: inverting matrices The last augmented matrix tells us that the inverse of 1 1 2 1 3 4 0 2 5 equals 1 7 1 2 5 5 2 6 2 2 2 24

Gaussian elimination: inverting matrices When does a (square) matrix have an inverse? If and only if its columns, seen as vectors, are linearly independent Equivalently, if and only if its rows, seen as transposed vectors, are linearly independent 25

The determinant of a matrix is the signed volume spanned by the column vectors The determinant det A of a matrix A is also written as A For example A = a 11 a 12 a 21 a 22 Determinant det A = A = a 11 a 12 a 21 a 22 26

Computing determinant Determinant can be computed as follows The determinant of a matrix is the sum of the products of the elements of any row or column of the matrix with their cofactors But we do not know yet what cofactors are... 27

Cofactors The cofactor of an entry a ij in a n n matrix A is the determinant of the (n 1) (n 1) matrix A that is obtained from A by removing the i-th row and the j-th column, multiplied by 1 i+j We need cofactors to determine the determinant, but we need a determinant to determine a cofactor To understand recursion, one needs to understand recursion Q: What is the bottom of this recursion? 28

Cofactors Example for a 4 4 matrix A, the cofactor of the entry a 13 is c a 13 = a 21 a 22 a 24 a 31 a 32 a 34 a 41 a 42 a 44 a 11 a 12 a 13 a 14 a 21 a 22 a 23 a 24 a 31 a 32 a 33 a 34 a 41 a 42 a 43 a 44 and A = a 13 a c 13 a 23 a c 23 + a 33 a c c 33 a 43 a 43 29

Example Determinant and cofactors 0 1 2 3 4 5 6 7 8 = 0 4 5 7 8 1 3 5 6 8 + 2 3 4 6 7 = 0 32 35 1 24 30 + 2 21 24 = 0 30

Systems of equations and determinant Consider the following system of linear equations x + y + 2z = 17 2x + y + z = 15 x + 2y + 3z = 26 Such a system of n equations in n unknowns can be solved by using determinants In general, if we have Ax = b, then x i = Ai A where A i is obtained from A by replacing the i-th column with b 31

Systems of equations and determinant So for our system x + y + 2z = 17 2x + y + z = 15 x + 2y + 3z = 26, we have x = 17 1 2 15 1 1 26 1 2 1 3 2 2 1 1 1 2 3 y = 1 17 2 2 15 1 1 1 26 1 3 2 2 1 1 1 2 3 z = 1 1 17 2 1 15 1 1 2 1 26 2 2 1 1 1 2 3 32