Lecture 2 Matrix Operations



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

1 Introduction to Matrices

Chapter 7. Matrices. Definition. An m n matrix is an array of numbers set out in m rows and n columns. Examples. (

Using row reduction to calculate the inverse and the determinant of a square matrix

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

Linear Algebra Notes for Marsden and Tromba Vector Calculus

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

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

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

9 MATRICES AND TRANSFORMATIONS

Typical Linear Equation Set and Corresponding Matrices

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

MAT188H1S Lec0101 Burbulla

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

Linear Algebra Review. Vectors

5. Orthogonal matrices

Introduction to Matrix Algebra

Similarity and Diagonalization. Similar Matrices

Lecture 4: Partitioned Matrices and Determinants

Notes on Determinant

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.

Question 2: How do you solve a matrix equation using the matrix inverse?

Vector and Matrix Norms

Solution to Homework 2

Matrix Differentiation

Data Mining: Algorithms and Applications Matrix Math Review

Introduction to Matrices for Engineers

Linear Algebra Review and Reference

Electrical Engineering 103 Applied Numerical Computing

Here are some examples of combining elements and the operations used:

Section V.3: Dot Product

A Primer on Index Notation

3 Orthogonal Vectors and Matrices

Inner products on R n, and more

Lecture L3 - Vectors, Matrices and Coordinate Transformations

Matrix Algebra in R A Minimal Introduction

Linear Algebra: Vectors

T ( a i x i ) = a i T (x i ).

Solving Linear Systems, Continued and The Inverse of a Matrix

Solution of Linear Systems

Chapter Two: Matrix Algebra and its Applications 1 CHAPTER TWO. Matrix Algebra and its applications

7.4. The Inverse of a Matrix. Introduction. Prerequisites. Learning Style. Learning Outcomes

MATH 304 Linear Algebra Lecture 18: Rank and nullity of a matrix.

[1] Diagonal factorization

F Matrix Calculus F 1

CS3220 Lecture Notes: QR factorization and orthogonal transformations

Linear Maps. Isaiah Lankham, Bruno Nachtergaele, Anne Schilling (February 5, 2007)

Notes on Symmetric Matrices

Linear Algebra: Determinants, Inverses, Rank

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

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

Matrices and Linear Algebra

Matrix Representations of Linear Transformations and Changes of Coordinates

Linear Algebra Done Wrong. Sergei Treil. Department of Mathematics, Brown University

Name: Section Registered In:

MATH 304 Linear Algebra Lecture 9: Subspaces of vector spaces (continued). Span. Spanning set.

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

a(1) = first.entry of a

Unified Lecture # 4 Vectors

Lecture Notes 2: Matrices as Systems of Linear Equations

Torgerson s Classical MDS derivation: 1: Determining Coordinates from Euclidean Distances

The Singular Value Decomposition in Symmetric (Löwdin) Orthogonalization and Data Compression

Lecture 5: Singular Value Decomposition SVD (1)

AMATH 352 Lecture 3 MATLAB Tutorial Starting MATLAB Entering Variables

8 Square matrices continued: Determinants

Elementary Matrices and The LU Factorization

Math 312 Homework 1 Solutions

Excel supplement: Chapter 7 Matrix and vector algebra

Matrix-vector multiplication in terms of dot-products

LINEAR ALGEBRA. September 23, 2010

Lecture 2 Linear functions and examples

Lecture notes on linear algebra

Brief Introduction to Vectors and Matrices

Similar matrices and Jordan form

DETERMINANTS TERRY A. LORING

Orthogonal Projections

GCE Mathematics (6360) Further Pure unit 4 (MFP4) Textbook

Eigenvalues and Eigenvectors

Mathematics Course 111: Algebra I Part IV: Vector Spaces

1 VECTOR SPACES AND SUBSPACES

Algebra Cheat Sheets

Continued Fractions and the Euclidean Algorithm

Arkansas Tech University MATH 4033: Elementary Modern Algebra Dr. Marcel B. Finan

Applied Linear Algebra I Review page 1

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

7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix

Lecture 1: Systems of Linear Equations

Problem Set 5 Due: In class Thursday, Oct. 18 Late papers will be accepted until 1:00 PM Friday.

Linear Algebra I. Ronald van Luijk, 2012

Discrete Convolution and the Discrete Fourier Transform

Vectors Math 122 Calculus III D Joyce, Fall 2012

6. Cholesky factorization

COLLEGE ALGEBRA 10 TH EDITION LIAL HORNSBY SCHNEIDER 1.1-1

Chapter 6. Orthogonality

DATA ANALYSIS II. Matrix Algorithms

Recall the basic property of the transpose (for any A): v A t Aw = v w, v, w R n.

MA106 Linear Algebra lecture notes

GENERATING SETS KEITH CONRAD

expression is written horizontally. The Last terms ((2)( 4)) because they are the last terms of the two polynomials. This is called the FOIL method.

SF2940: Probability theory Lecture 8: Multivariate Normal Distribution

Transcription:

Lecture 2 Matrix Operations transpose, sum & difference, scalar multiplication matrix multiplication, matrix-vector product matrix inverse 2 1

Matrix transpose transpose of m n matrix A, denoted A T or A, is n m matrix with ( A T ) ij = A ji rows and columns of A are transposed in A T example: 0 4 T 7 0 0 7 3 =. 4 0 1 3 1 transpose converts row vectors to column vectors, vice versa ( A T) T = A Matrix Operations 2 2

Matrix addition & subtraction if A and B are both m n, we form A+B by adding corresponding entries example: 0 4 7 0 + 1 2 2 3 = 1 6 9 3 3 1 0 4 3 5 can add row or column vectors same way (but never to each other!) 1 6 0 6 matrix subtraction is similar: I = 9 3 9 2 (here we had to figure out that I must be 2 2) Matrix Operations 2 3

Properties of matrix addition commutative: A + B = B + A associative: (A+B)+C = A+(B +C), so we can write as A+B +C A + 0 = 0 + A = A; A A = 0 (A + B) T = A T + B T Matrix Operations 2 4

Scalar multiplication we can multiply a number (a.k.a. scalar) by a matrix by multiplying every entry of the matrix by the scalar this is denoted by juxtaposition or, with the scalar on the left: ( 2) 1 6 9 3 = 2 12 18 6 6 0 12 0 (sometimes you see scalar multiplication with the scalar on the right) (α + β)a = αa + βa; (αβ)a = (α)(βa) α(a + B) = αa + αb 0 A = 0; 1 A = A Matrix Operations 2 5

Matrix multiplication if A is m p and B is p n we can form C = AB, which is m n C ij = p a ik b kj = a i1 b 1j + + a ip b pj, i = 1,...,m, j = 1,...,n k=1 to form AB, #cols of A must equal #rows of B; called compatible to find i,j entry of the product C = AB, you need the ith row of A and the jth column of B form product of corresponding entries, e.g., third component of ith row of A and third component of jth column of B add up all the products Matrix Operations 2 6

Examples example 1: 1 6 9 3 0 1 1 2 = 6 11 3 3 for example, to get 1, 1 entry of product: C 11 = A 11 B 11 + A 12 B 21 = (1)(0) + (6)( 1) = 6 example 2: 0 1 1 2 1 6 9 3 = 9 3 17 0 these examples illustrate that matrix multiplication is not (in general) commutative: we don t (always) have AB = BA Matrix Operations 2 7

Properties of matrix multiplication 0A = 0, A0 = 0 (here 0 can be scalar, or a compatible matrix) IA = A, AI = A (AB)C = A(BC), so we can write as ABC α(ab) = (αa)b, where α is a scalar A(B + C) = AB + AC, (A + B)C = AC + BC (AB) T = B T A T Matrix Operations 2 8

Matrix-vector product very important special case of matrix multiplication: y = Ax A is an m n matrix x is an n-vector y is an m-vector y i = A i1 x 1 + + A in x n, i = 1,...,m can think of y = Ax as a function that transforms n-vectors into m-vectors a set of m linear equations relating x to y Matrix Operations 2 9

Inner product if v is a row n-vector and w is a column n-vector, then vw makes sense, and has size 1 1, i.e., is a scalar: vw = v 1 w 1 + + v n w n if x and y are n-vectors, x T y is a scalar called inner product or dot product of x, y, and denoted x,y or x y: x,y = x T y = x 1 y 1 + + x n y n (the symbol can be ambiguous it can mean dot product, or ordinary matrix product) Matrix Operations 2 10

Matrix powers if matrix A is square, then product AA makes sense, and is denoted A 2 more generally, k copies of A multiplied together gives A k : by convention we set A 0 = I A k = A A A } {{ } k (non-integer powers like A 1/2 are tricky that s an advanced topic) we have A k A l = A k+l Matrix Operations 2 11

Matrix inverse if A is square, and (square) matrix F satisfies FA = I, then F is called the inverse of A, and is denoted A 1 the matrix A is called invertible or nonsingular if A doesn t have an inverse, it s called singular or noninvertible by definition, A 1 A = I; a basic result of linear algebra is that AA 1 = I we define negative powers of A via A k = ( A 1) k Matrix Operations 2 12

Examples example 1: 1 1 1 2 1 = 1 3 2 1 1 1 (you should check this!) example 2: 1 1 2 2 does not have an inverse; let s see why: a b c d 1 1 2 2 = a 2b a + 2b c 2d c + 2d = 1 0 0 1... but you can t have a 2b = 1 and a + 2b = 0 Matrix Operations 2 13

Properties of inverse ( A 1) 1 = A, i.e., inverse of inverse is original matrix (assuming A is invertible) (AB) 1 = B 1 A 1 (assuming A, B are invertible) ( A T) 1 = ( A 1 ) T (assuming A is invertible) I 1 = I (αa) 1 = (1/α)A 1 (assuming A invertible, α 0) if y = Ax, where x R n and A is invertible, then x = A 1 y: A 1 y = A 1 Ax = Ix = x Matrix Operations 2 14

Inverse of 2 2 matrix it s useful to know the general formula for the inverse of a 2 2 matrix: a b c d 1 = 1 ad bc d b c a provided ad bc 0 (if ad bc = 0, the matrix is singular) there are similar, but much more complicated, formulas for the inverse of larger square matrices, but the formulas are rarely used Matrix Operations 2 15