Lecture 3 Linear Algebra Background

Similar documents
Mathematics 13: Lecture 10

Matrices: 2.1 Operations with Matrices

Matrices BUSINESS MATHEMATICS

Lecture 3: Matrix and Matrix Operations

Matrix Arithmetic. j=1

Elementary maths for GMT

Linear Algebra V = T = ( 4 3 ).

ICS 6N Computational Linear Algebra Matrix Algebra

Elementary Row Operations on Matrices

CS 246 Review of Linear Algebra 01/17/19

Phys 201. Matrices and Determinants

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

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

Linear Equations and Matrix

Matrix Algebra Determinant, Inverse matrix. Matrices. A. Fabretti. Mathematics 2 A.Y. 2015/2016. A. Fabretti Matrices

Review of Linear Algebra

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

POLI270 - Linear Algebra

Linear Algebra and Matrix Inversion

CLASS 12 ALGEBRA OF MATRICES

A primer on matrices

10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections )

Matrix Operations. Linear Combination Vector Algebra Angle Between Vectors Projections and Reflections Equality of matrices, Augmented Matrix

Matrix operations Linear Algebra with Computer Science Application

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

Matrices. Chapter Definitions and Notations

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

Review of linear algebra

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

Matrices and Vectors

CS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages:

DM559 Linear and Integer Programming. Lecture 3 Matrix Operations. Marco Chiarandini

2.1 Matrices. 3 5 Solve for the variables in the following matrix equation.

Linear Algebra Tutorial for Math3315/CSE3365 Daniel R. Reynolds

Announcements Wednesday, October 10

Announcements Monday, October 02

Kevin James. MTHSC 3110 Section 2.1 Matrix Operations

Two matrices of the same size are added by adding their corresponding entries =.

Matrix Basic Concepts

What is the Matrix? Linear control of finite-dimensional spaces. November 28, 2010

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

Matrix Arithmetic. a 11 a. A + B = + a m1 a mn. + b. a 11 + b 11 a 1n + b 1n = a m1. b m1 b mn. and scalar multiplication for matrices via.

Prepared by: M. S. KumarSwamy, TGT(Maths) Page

Matrices. Math 240 Calculus III. Wednesday, July 10, Summer 2013, Session II. Matrices. Math 240. Definitions and Notation.

M. Matrices and Linear Algebra

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

Stage-structured Populations

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

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

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

Matrix & Linear Algebra

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

Introduction to Matrix Algebra

ELEMENTARY LINEAR ALGEBRA

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

MATRICES AND MATRIX OPERATIONS

. a m1 a mn. a 1 a 2 a = a n

4 Linear Algebra Review

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

A primer on matrices

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

MATH Topics in Applied Mathematics Lecture 12: Evaluation of determinants. Cross product.

Getting Started with Communications Engineering. Rows first, columns second. Remember that. R then C. 1

Knowledge Discovery and Data Mining 1 (VO) ( )

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

Vectors and matrices: matrices (Version 2) This is a very brief summary of my lecture notes.

Mathematics for Graphics and Vision

Section 12.4 Algebra of Matrices

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Review of Basic Concepts in Linear Algebra

Lecture 6: Geometry of OLS Estimation of Linear Regession

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

4 Linear Algebra Review

Matrix Algebra. Learning Objectives. Size of Matrix

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.

Linear Algebra Review. Vectors

Dot Products, Transposes, and Orthogonal Projections

ELEMENTARY LINEAR ALGEBRA

Matrix Multiplication

2. Matrix Algebra and Random Vectors

Matrix Algebra 2.1 MATRIX OPERATIONS Pearson Education, Inc.

Lecture Notes in Linear Algebra

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra /34

Math 4377/6308 Advanced Linear Algebra

Chapter 5: Matrices. Daniel Chan. Semester UNSW. Daniel Chan (UNSW) Chapter 5: Matrices Semester / 33

CS123 INTRODUCTION TO COMPUTER GRAPHICS. Linear Algebra 1/33

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

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

Chapter 2. Matrix Arithmetic. Chapter 2

Math 360 Linear Algebra Fall Class Notes. a a a a a a. a a a

Numerical Analysis Lecture Notes

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

Math 3191 Applied Linear Algebra

Section 1.6. M N = [a ij b ij ], (1.6.2)

5.1 Introduction to Matrices

OR MSc Maths Revision Course

Chapter 2 Notes, Linear Algebra 5e Lay

Chapter 2. Ma 322 Fall Ma 322. Sept 23-27

Basic Concepts in Linear Algebra

Transcription:

Lecture 3 Linear Algebra Background Dan Sheldon September 17, 2012

Motivation Preview of next class: y (1) w 0 + w 1 x (1) 1 + w 2 x (1) 2 +... + w d x (1) d y (2) w 0 + w 1 x (2) 1 + w 2 x (2) 2 +... + w d x (2) d... y (N) w 0 + w 1 x (N) 1 + w 2 x (N) 2 +... + w d x (N) d After linear algebra y Xw

Linear Algebra in ML Linear Algebra Succinct notation for models and algorithms Numerical tools (save coding!) w = (X T X) 1 X T y Inspiration for new models and problems: Netflix

Netflix Movie Recommendations Gladiator Silence of the Lambs WALL-E Toy Story Alice 5 4 1 Bob 5 2 Carol 5 David 5 5 Eve 5 4 Matrix completion problem, matrix factorization

Today s Topics Matrices Vectors Matrix-Matrix multiplication (and special cases) Tranpose Inverse

Matrices A matrix is an rectangular array of numbers 101 10 A = 54 13 10 47 When A has m rows and n columns, we say that: A is an m n matrix A R m n The entry in row i and column j is denoted A ij

Matrices Example A R 3 2 A 11 = 101 A 32 = A 22 = A 23 = A = 101 10 54 13 10 47

Vectors A vector is an n 1 matrix: x = 8 2.4 1 10 We write x R n (instead of x R n 1 ) The ith entry is x i

Vectors Example x = 8 2.4 1 10 x R 4 x 1 = x 4 =

Addition If two matrices have the same size, we can add them by adding corresponding elements [ ] [ ] [ ] 1 2 3 5 4 7 + = 3 4 1 0 2 4 Subtraction is similar Matrices of different sizes cannot be added or subtracted

Scalar Multiplication A scalar x R is a real number (i.e., not a vector) Scalar times matrix: e.g., 2, 3, π, 2, 1.843,... 2 [ ] 1 3 = 2 0 (multiply each entry by the scalar) [ 2 ] 6 4 0

Matrix-Matrix Multiplication Can multiply two matrices if their inner dimensions match A R m n, B R n p The product has entries C = AB R m p n C ij = A ik B kj k=1

Matrix-Matrix Multiplication C ij = n A ik B kj k=1 Move along ith row of A and jth row of B. Multiply corresponding entries, then add. c 11 c 12 c 13 a 11 a 12 [ ] c 21 c 22 c 23 c 31 c 32 c 33 = a 21 a 22 b11 b 12 b 13 a 31 a 32 b 21 b 22 b 23 c 41 c 42 c 43 a 41 a 42 c 32 = a 31 b 12 + a 32 b 22

Matrix-Matrix Multiplication Example [ ] [ ] 1 1 3 2 A =, B = 0 3 1 0 [ ] [ ] [ ] 1 1 3 2 4 2 AB = = 0 3 1 0 3 0

Multiplication Properties Associative Distributive Not commutative (AB)C = A(BC) A(B + C) = AB + AC (B + C)D = BD + CD AB BA

Matrix-Vector Multiplication A (worthy) special case of matrix-matrix multiplication: A R m n, x R n y = Ax R m Definition n y i = A ij x j j=1

Matrix-Vector Multiplication y i = n A ij x j j=1 y 1 a 11 a 12 y 2 y 3 = a 21 a 22 a 31 a 32 y 4 a 41 a 42 [ x1 x 2 ] y 3 = a 31 x 1 + a 32 x 2

Matrix-Vector Multiplication Example A = [ 1 1 Ax = 0 3 [ ] 6.5 Az = 4.5 [ ] [ ] 1 1 1, x = 0 3 1 ] [ 1 1 ] = [ ] 2 3 z = [ ] 8 1.5

Transpose Transposition of a matrix swaps the rows and columns [ ] [ ] 1 1 A =, A T 1 0 =. 0 3 1 3 Definition: Let A R m n The transpose A T R n m has entries (A T ) ij = A ji.

Transpose Example 3 2 A = 1 0 A T = 1 4 [ 3 1 ] 1 2 0 4 Example 1 x = 3 x T = [ 1 3 2 ] 2

Dot product A special special-case of matrix-matrix multiplication Let x, y be vectors of same size (x, y R n ). Their dot product is x T y = n x i y i i=1 y 1 = [ ] y 2 x 1 x 2... x n. y n

Vector Norm The norm of a vector x = x 2 1 + x2 2 +... + x2 n = x T x Geometric interpretation: length of the vector

Transpose Properties Transpose of transpose (A T ) T = A Transpose of sum Transpose of product (A + B) T = A T + B T (AB) T = B T A T

Identity The identity matrix I R n n has entries { 1 i = j I ij = 0 i j, I 1 1 = [1], I 2 2 = For any A, B of appropriate dimensions [ ] 1 0 0 1 0, I 0 1 3 3 = 0 1 0. 0 0 1 IA = A BI = B

Inverse The inverse A 1 R n n of a square matrix A R n n satisfies AA 1 = I = A 1 A Compare to division of scalars xx 1 = 1 = x 1 x Not all matrices are invertible [ ] 0 0 E.g., A not square, A = [0], A =, many more 0 0

Inverse Example A = Is B the inverse of A? [ ] 1 0, B = 0 2 [ ] 1 0 1 0 2 Example A = Verify on your own. [ ] 1 1 0 3 A 1 = [ ] 1 1 3 1 0 3

Inverse Properties Inverse of inverse Inverse of product (A 1 ) 1 = A (AB) 1 = B 1 A 1 Inverse of transpose (A 1 ) T = (A T ) 1 := A T

What You Should Know Definitions of matrices and vectors Meaning of matrix multiplication Systems of equations matrix-vector equations Properties of multiplication Properties of inverse, transpose Get familiar with these as course goes on