Lecture 7: Matrix-Vector Product; Matrix of a Linear Transformation; Matrix-Matrix Product Sections 2.1, 2.2.1, 2.2.2.

Slides:



Advertisements
Similar presentations
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
Advertisements

Lecture 9: Introduction to Matrix Inversion Gaussian Elimination Sections 2.4, 2.5, 2.6 Sections 2.2.3, 2.3.
Mathematics. Matrices and Determinants-1 Session.
MF-852 Financial Econometrics
Economics 2301 Lecture 11 Matrix Algebra. Acknowledgement Much of the material on these slides was taken from Krishnan Namboodiri's book, MATRIX ALGEBRA:
Chapter 2 Basic Linear Algebra
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 12 System of Linear Equations.
Review of Matrix Algebra
CSci 6971: Image Registration Lecture 2: Vectors and Matrices January 16, 2004 Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware Prof. Chuck Stewart, RPI.
Linear Equations in Linear Algebra
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
Boot Camp in Linear Algebra Joel Barajas Karla L Caballero University of California Silicon Valley Center October 8th, 2008.
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
Lecture 8: Cascaded Linear Transformations Row and Column Selection Permutation Matrices Matrix Transpose Sections 2.2.3, 2.3.
INDR 262 INTRODUCTION TO OPTIMIZATION METHODS LINEAR ALGEBRA INDR 262 Metin Türkay 1.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
3.8 Matrices.
1 Chapter 3 Matrix Algebra with MATLAB Basic matrix definitions and operations were covered in Chapter 2. We will now consider how these operations are.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Linear Algebra Review By Tim K. Marks UCSD Borrows heavily from: Jana Kosecka Virginia de Sa (UCSD) Cogsci 108F Linear.
1.3 Matrices and Matrix Operations.
259 Lecture 14 Elementary Matrix Theory. 2 Matrix Definition  A matrix is a rectangular array of elements (usually numbers) written in rows and columns.
Compiled By Raj G. Tiwari
Sundermeyer MAR 550 Spring Laboratory in Oceanography: Data and Methods MAR550, Spring 2013 Miles A. Sundermeyer Linear Algebra & Calculus Review.
ECON 1150 Matrix Operations Special Matrices
 Row and Reduced Row Echelon  Elementary Matrices.
Rev.S08 MAC 1140 Module 10 System of Equations and Inequalities II.
Matrix Algebra. Quick Review Quick Review Solutions.
Digital Image Processing, 3rd ed. © 1992–2008 R. C. Gonzalez & R. E. Woods Gonzalez & Woods Matrices and Vectors Objective.
Statistics and Linear Algebra (the real thing). Vector A vector is a rectangular arrangement of number in several rows and one column. A vector is denoted.
1.3 Matrices and Matrix Operations. Definition A matrix is a rectangular array of numbers. The numbers in the array are called the entries in the matrix.
Fin500J Mathematical Foundations in Finance Topic 1: Matrix Algebra Philip H. Dybvig Reference: Mathematics for Economists, Carl Simon and Lawrence Blume,
8.1 Matrices & Systems of Equations
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 5 Systems and Matrices Copyright © 2013, 2009, 2005 Pearson Education, Inc.
Lecture 28: Mathematical Insight and Engineering.
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
Unit 3: Matrices.
Algebra 3: Section 5.5 Objectives of this Section Find the Sum and Difference of Two Matrices Find Scalar Multiples of a Matrix Find the Product of Two.
Matrices. Definitions  A matrix is an m x n array of scalars, arranged conceptually as m rows and n columns.  m is referred to as the row dimension.
Linear Algebra 1.Basic concepts 2.Matrix operations.
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
Prepared by Deluar Jahan Moloy Lecturer Northern University Bangladesh
Chapter 6 Systems of Linear Equations and Matrices Sections 6.3 – 6.5.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS Slides Relations, Functions.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
Slide Copyright © 2009 Pearson Education, Inc. 7.3 Matrices.
1.3 Matrices and Matrix Operations. A matrix is a rectangular array of numbers. The numbers in the arry are called the Entries in the matrix. The size.
Copyright © Cengage Learning. All rights reserved. 2 SYSTEMS OF LINEAR EQUATIONS AND MATRICES.
Matrices and Determinants
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
Linear System of Simultaneous Equations Warm UP First precinct: 6 arrests last week equally divided between felonies and misdemeanors. Second precinct:
Unit 3: Matrices. Matrix: A rectangular arrangement of data into rows and columns, identified by capital letters. Matrix Dimensions: Number of rows, m,
Matrices Presentation by : Miss Matkar Pallavi. P.
Boot Camp in Linear Algebra TIM 209 Prof. Ram Akella.
1 Objective To provide background material in support of topics in Digital Image Processing that are based on matrices and/or vectors. Review Matrices.
Matrices, Vectors, Determinants.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
Lecture 1 Linear algebra Vectors, matrices. Linear algebra Encyclopedia Britannica:“a branch of mathematics that is concerned with mathematical structures.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Matrices. Matrix A matrix is an ordered rectangular array of numbers. The entry in the i th row and j th column is denoted by a ij. Ex. 4 Columns 3 Rows.
MTH108 Business Math I Lecture 20.
Matrices and Matrix Operations
Linear Algebraic Equations and Matrices
Chapter 7 Matrix Mathematics
Linear Algebraic Equations and Matrices
7.3 Matrices.
Section 2.4 Matrices.
Matrices and Matrix Operations
Presentation transcript:

Lecture 7: Matrix-Vector Product; Matrix of a Linear Transformation; Matrix-Matrix Product Sections 2.1, 2.2.1, 2.2.2

Key Points The matrix-vector product Ax, where A is a m × n matrix and x is a n- dimensional column vector, is computed by taking the dot product of each row of A with x. The result is a m-dimensional column vector. For a fixed matrix A, the product A x is linear in x: A(c 1 x (1) + c 2 x (2) )= c 1 A x (1) + c 2 Ax (2) In other words, A acts as a linear transformation, or linear system, which maps n-dimensional vectors to m-dimensional ones. Every linear transformation, or linear system, R n → R m has a m × n matrix A associated with it. Each column of A is obtained by applying that transformation to the respective standard n-dimensional unit vector. If A is m × p and B is p × n, then the product A B is a m × n matrix whose (i, j)th element is the dot product of the i th row of A and the j th column of B.

Review A m × n matrix consists of entries (or elements) a ij, where i and j are the row and column indices, respectively. The space of all real- valued m × n matrices is denoted by R m×n. A column vector is a matrix consisting of one column only; a row vector is a matrix consisting of one row only. The transpose operator · T converts row vectors to column vectors and vice versa. By default, a lower-case boldface letter such as a corresponds to a column vector. In situations where the orientation (row or column) of a vector is immaterial, we simply write a =(a 1,...,a n ) which is a vector in Rn. The sum S = A + B of two matrices of the same dimension is obtained by adding respective entries together: s ij = a ij + b ij The matrix cA, where c is a real number, has the same dimensions as A and is obtained by scaling each entry of A by c

Overview Matrix: ▫rectangular array of elements represented by a single symbol (e.g. [A]). Element ▫An individual entry of a matrix ▫example: a 23 – a row column

Overview (cont) A horizontal set of elements is called a row and a vertical set of elements is called a column. The first subscript of an element indicates the row while the second indicates the column. The size of a matrix is given as m rows by n columns, or simply m by n (or m x n). 1 x n matrices are row vectors. m x 1 matrices are column vectors.

Special Matrices Matrices where m=n are called square matrices. There are a number of special forms of square matrices:

Matrix Operations Equal Matrices ▫Two matrices are considered equal if and only if every element in the first matrix is equal to every corresponding element in the second. ▫Both matrices must be the same size. Matrix addition and subtraction ▫ performed by adding or subtracting the corresponding elements. ▫Matrices must be the same size.

Example Addition & Subtraction is not defined.

Matrix Multiplication Scalar matrix multiplication is performed by multiplying each element by the same scalar. If A is a row matrix and B is a column matrix, then we can form the product A  B provided that the two matrices have the same length. The product A  B is a 1x1 matrix obtained by multiplying corresponding entries of A and B and then forming the sum.

Example Multiplying Row to Column is not defined.

Matrix Multiplication If A is an mxn matrix and B is an nxq matrix, then we can form the product A  B. The product A  B is an mxq matrix whose entries are obtained by multiplying the rows of A by the columns of B. The entry in the i th row and j th column of the product A  B is formed by multiplying the i th row of A and j th column of B.

Example Matrix Multiplication is not defined. Matlab command: A*B – no dot multiplication

Matrix Inverse and Transpose The inverse of a square matrix A, denoted by A -1, is a square matrix with the property A -1 A = AA -1 = I, where I is an identity matrix of the same size. ▫Matlab command: inv(A), A^ -1 The transpose of a matrix involves transforming its rows into columns and its columns into rows. ▫(a ij ) T =a ji ▫Matlab command: a’ or transpose(a)

Example Verify that is the inverse of checks

Representing Linear Algebra Matrices provide a concise notation for representing and solving simultaneous linear equations:

Solving a Matrix Equation ▫If the matrix A has an inverse, then the solution of the matrix equation AX = B is given by X = A -1 B.

Example Solving a Matrix Equation Use a matrix equation to solve The matrix form of the equation is

Solving With MATLAB MATLAB provides two direct ways to solve systems of linear algebraic equations [A]{x}={b}: ▫Left-division x = A\b ▫Matrix inversion x = inv(A)*b Disadvantages of the matrix inverse method: ▫less efficient than left-division ▫only works for square, non-singular systems.

Matrix-Vector Multiplication If A is a m × n matrix and x is a n × 1 (column) vector, then y = Ax is an m × 1 vector such that In other words, the i th entry of y is the dot product of the i th row of A with x. We will also view the product y = Ax as a linear combination of the columns of A with coe ffi cients given by the (respective) entries of x.

Example

Superposition Property A vector of the form c 1 x (1) + c 2 x (2) where c 1 and c 2 are scalars, is known as a linear combination of the vectors x (1) and x (2). For a fixed matrix A, the product Ax is linear in x, i.e., it has the property that A(c 1 x (1) + c 2 x (2) )= c 1 A x (1) + c 2 Ax (2) for any vectors x (1), x (2) and scalars c 1, c 2. This is known as the superposition property, and is easily proved by considering the i th entry on each side:

Linear Transformation An m × n matrix A represents a linear transformation of R n to R m. Such a linear transformation is also referred to as a linear system with n-dimensional input vector x and m-dimensional output vector y:

Example Suppose the 2 × n matrix A and the n-dimensional column vectors u and v are such that and then

Example The linear transformation represented by the matrix is such that Thus the e ff ect of applying A to an arbitrary vector x is to shift the entries of x up (or down) by two positions in a circular fashion. This linear transformation is an example of a permutation, and all permutations are linear

Extra Credit Activity You are given an image whose dimensions match those of a 36 inch (diagonal) display with an aspect ratio of 16 (horizontal) to 9 (vertical). You want to display the image on a 27 inch (diagonal) display with an aspect ratio of 4 (horizontal) to 3 (vertical) such that the image is as large as possible without distortion or cropping. Find the matrix which accomplsihes this. (Note: I is the identity matrix.)

Example Conversely, every linear transformation A : R n → R m has an m × n matrix associated with it. This can be seen by expressing an arbitrary input vector x as a linear combination of the standard unit vectors: x = x 1 e (1) x n e (n) By linearity of A( · ), the output vector y = A(x) is given by: y = x 1 Ae (1) x n Ae (n) If we form an m × n matrix A =[a ij ] using A(e (1) ),...,A(e (n) ) as its columns (in that order), then the output vector y (above) is, in e ff ect, a linear combination of the columns of A with coe ffi cients x 1,...,x n. In other words, and thus y = A(x) is also given by y = Ax

Example If the linear transformation A( · ): R 3 → R 3 is such that then the matrix A of A(·) is given by

Example Suppose now that A( · ): R 2 → R 2 represents the projection of a two-dimensional vector x =(x 1,x 2 ) onto the horizontal (i.e., x 1 ) axis. From vector geometry, we know that this is a linear transformation: the projection of a sum of (possibly scaled) vectors is the sum of their projections. We can therefore obtain the matrix A by considering the result of applying A(·) to the two unit vectors (1, 0) and (0, 1). We have so

Example Similarly, the rotation of a two-dimensional vector through a fixed angle is linear: when two vectors are rotated through the same angle, their (possibly scaled) sum is also rotated through that angle. If B is the matrix representing a counterclockwise rotation by 30 0, then so Question: How were these values obtained?

Matrix-Matrix Multiplication If A is m × p and B is p × n, then the product AB is the m × n matrix whose (i, j) th element is the dot product of the i th row of A and the j th column of B: The number of columns of A must be the same as the number of rows of B (equal to p in this case, and also referred to as the inner dimension in the product).

Example