Lecture 2 Linear functions and examples



Similar documents
8. Linear least-squares

Lecture 2 Matrix Operations

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

Lecture 5 Least-squares

Solving Systems of Linear Equations

Linear Algebra Notes for Marsden and Tromba Vector Calculus

6. Cholesky factorization

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

Mathematics Course 111: Algebra I Part IV: Vector Spaces

5. Orthogonal matrices

Statics of Structural Supports

CITY UNIVERSITY LONDON. BEng Degree in Computer Systems Engineering Part II BSc Degree in Computer Systems Engineering Part III PART 2 EXAMINATION

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.

11.1. Objectives. Component Form of a Vector. Component Form of a Vector. Component Form of a Vector. Vectors and the Geometry of Space

1 Introduction to Matrices

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

4.2 Free Body Diagrams

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

A vector is a directed line segment used to represent a vector quantity.

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

DATA ANALYSIS II. Matrix Algorithms

Similarity and Diagonalization. Similar Matrices

Systems of Linear Equations

Lecture 14: Section 3.3

Chapter 19. General Matrices. An n m matrix is an array. a 11 a 12 a 1m a 21 a 22 a 2m A = a n1 a n2 a nm. The matrix A has n row vectors

MAT188H1S Lec0101 Burbulla

Section 1.1. Introduction to R n

1 Determinants and the Solvability of Linear Systems

Understanding and Applying Kalman Filtering

Example SECTION X-AXIS - the horizontal number line. Y-AXIS - the vertical number line ORIGIN - the point where the x-axis and y-axis cross

Force measurement. Forces VECTORIAL ISSUES ACTION ET RÉACTION ISOSTATISM

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

Matrix Differentiation

2.1 Introduction. 2.2 Terms and definitions

Math 241, Exam 1 Information.

THREE DIMENSIONAL GEOMETRY

Force/position control of a robotic system for transcranial magnetic stimulation

x = + x 2 + x

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

Vector Spaces; the Space R n

Data Mining: Algorithms and Applications Matrix Math Review

Section Continued

Figure 1.1 Vector A and Vector F

Lecture L3 - Vectors, Matrices and Coordinate Transformations

Physics 9e/Cutnell. correlated to the. College Board AP Physics 1 Course Objectives

Basic Laws Circuit Theorems Methods of Network Analysis Non-Linear Devices and Simulation Models

Systems of Linear Equations

Module 1 : Conduction. Lecture 5 : 1D conduction example problems. 2D conduction

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

Inner Product Spaces and Orthogonality

Electrical Engineering 103 Applied Numerical Computing

Dynamic Process Modeling. Process Dynamics and Control

Solving Systems of Linear Equations

Chapter 6. Linear Transformation. 6.1 Intro. to Linear Transformation

Sample Questions for the AP Physics 1 Exam

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

Geometric description of the cross product of the vectors u and v. The cross product of two vectors is a vector! u x v is perpendicular to u and v

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

Section 1.4. Lines, Planes, and Hyperplanes. The Calculus of Functions of Several Variables

12.5 Equations of Lines and Planes

Lecture 1: Systems of Linear Equations

When the fluid velocity is zero, called the hydrostatic condition, the pressure variation is due only to the weight of the fluid.

Some Lecture Notes and In-Class Examples for Pre-Calculus:

Lecture notes on linear algebra

Hybrid Modeling and Control of a Power Plant using State Flow Technique with Application

Vector and Matrix Norms

Rotation Matrices and Homogeneous Transformations

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

Chapter 11 Equilibrium

Problems. Universidad San Pablo - CEU. Mathematical Fundaments of Biomedical Engineering 1. Author: First Year Biomedical Engineering

1 VECTOR SPACES AND SUBSPACES

Dynamics. Basilio Bona. DAUIN-Politecnico di Torino. Basilio Bona (DAUIN-Politecnico di Torino) Dynamics / 30

Lecture Notes: ECS 203 Basic Electrical Engineering Semester 1/2010. Dr.Prapun Suksompong 1 June 16, 2010

LINEAR ALGEBRA W W L CHEN

Physics 235 Chapter 1. Chapter 1 Matrices, Vectors, and Vector Calculus

( ) which must be a vector

Lecture 07: Work and Kinetic Energy. Physics 2210 Fall Semester 2014

Solution to Homework 2

Equations of Lines and Planes

Chapter 1: Statics. A) Newtonian Mechanics B) Relativistic Mechanics

FURTHER VECTORS (MEI)

Two vectors are equal if they have the same length and direction. They do not

5 VECTOR GEOMETRY. 5.0 Introduction. Objectives. Activity 1

State Newton's second law of motion for a particle, defining carefully each term used.

SOLVING LINEAR SYSTEMS

9 Multiplication of Vectors: The Scalar or Dot Product

South Carolina College- and Career-Ready (SCCCR) Pre-Calculus

Tutorial on Using Excel Solver to Analyze Spin-Lattice Relaxation Time Data

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

by the matrix A results in a vector which is a reflection of the given

An Introduction to Applied Mathematics: An Iterative Process

The dynamic equation for the angular motion of the wheel is R w F t R w F w ]/ J w

Logistic Regression. Jia Li. Department of Statistics The Pennsylvania State University. Logistic Regression

Math 215 HW #6 Solutions

9 MATRICES AND TRANSFORMATIONS

ISOMETRIES OF R n KEITH CONRAD

AP PHYSICS C Mechanics - SUMMER ASSIGNMENT FOR

State Newton's second law of motion for a particle, defining carefully each term used.

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

Adding vectors We can do arithmetic with vectors. We ll start with vector addition and related operations. Suppose you have two vectors

Transcription:

EE263 Autumn 2007-08 Stephen Boyd Lecture 2 Linear functions and examples linear equations and functions engineering examples interpretations 2 1

Linear equations consider system of linear equations y 1 = a 11 x 1 + a 12 x 2 + + a 1n x n y 2 =. a 21 x 1 + a 22 x 2 + + a 2n x n y m = a m1 x 1 + a m2 x 2 + + a mn x n can be written in matrix form as y = Ax, where y = y 1 y 2. y m A = a 11 a 12 a 1n a 21 a 22 a 2n..... a m1 a m2 a mn x = x 1 x 2. x n Linear functions and examples 2 2

Linear functions a function f : R n R m is linear if f(x + y) = f(x) + f(y), x, y R n f(αx) = αf(x), x R n α R i.e., superposition holds f(x + y) f(y) y x x + y f(x) Linear functions and examples 2 3

Matrix multiplication function consider function f : R n R m given by f(x) = Ax, where A R m n matrix multiplication function f is linear converse is true: any linear function f : R n R m can be written as f(x) = Ax for some A R m n representation via matrix multiplication is unique: for any linear function f there is only one matrix A for which f(x) = Ax for all x y = Ax is a concrete representation of a generic linear function Linear functions and examples 2 4

Interpretations of y = Ax y is measurement or observation; x is unknown to be determined x is input or action ; y is output or result y = Ax defines a function or transformation that maps x R n into y R m Linear functions and examples 2 5

Interpretation of a ij y i = n a ij x j j=1 a ij is gain factor from jth input (x j ) to ith output (y i ) thus, e.g., ith row of A concerns ith output jth column of A concerns jth input a 27 = 0 means 2nd output (y 2 ) doesn t depend on 7th input (x 7 ) a 31 a 3j for j 1 means y 3 depends mainly on x 1 Linear functions and examples 2 6

a 52 a i2 for i 5 means x 2 affects mainly y 5 A is lower triangular, i.e., a ij = 0 for i < j, means y i only depends on x 1,...,x i A is diagonal, i.e., a ij = 0 for i j, means ith output depends only on ith input more generally, sparsity pattern of A, i.e., list of zero/nonzero entries of A, shows which x j affect which y i Linear functions and examples 2 7

Linear elastic structure x j is external force applied at some node, in some fixed direction y i is (small) deflection of some node, in some fixed direction x 1 x 2 x 3 x 4 (provided x, y are small) we have y Ax A is called the compliance matrix a ij gives deflection i per unit force at j (in m/n) Linear functions and examples 2 8

Total force/torque on rigid body x 4 x 3 CG x 1 x 2 x j is external force/torque applied at some point/direction/axis y R 6 is resulting total force & torque on body (y 1, y 2, y 3 are x-, y-, z- components of total force, y 4, y 5, y 6 are x-, y-, z- components of total torque) we have y = Ax A depends on geometry (of applied forces and torques with respect to center of gravity CG) jth column gives resulting force & torque for unit force/torque j Linear functions and examples 2 9

Linear static circuit interconnection of resistors, linear dependent (controlled) sources, and independent sources y 3 i b x 2 y 1 x 1 βi b y 2 x j is value of independent source j y i is some circuit variable (voltage, current) we have y = Ax if x j are currents and y i are voltages, A is called the impedance or resistance matrix Linear functions and examples 2 10

Final position/velocity of mass due to applied forces f unit mass, zero position/velocity at t = 0, subject to force f(t) for 0 t n f(t) = x j for j 1 t < j, j = 1,...,n (x is the sequence of applied forces, constant in each interval) y 1, y 2 are final position and velocity (i.e., at t = n) we have y = Ax a 1j gives influence of applied force during j 1 t < j on final position a 2j gives influence of applied force during j 1 t < j on final velocity Linear functions and examples 2 11

Gravimeter prospecting g i g avg ρ j x j = ρ j ρ avg is (excess) mass density of earth in voxel j; y i is measured gravity anomaly at location i, i.e., some component (typically vertical) of g i g avg y = Ax Linear functions and examples 2 12

A comes from physics and geometry jth column of A shows sensor readings caused by unit density anomaly at voxel j ith row of A shows sensitivity pattern of sensor i Linear functions and examples 2 13

Thermal system location 4 heating element 5 x 1 x 2 x 3 x 4 x 5 x j is power of jth heating element or heat source y i is change in steady-state temperature at location i thermal transport via conduction y = Ax Linear functions and examples 2 14

a ij gives influence of heater j at location i (in C/W) jth column of A gives pattern of steady-state temperature rise due to 1W at heater j ith row shows how heaters affect location i Linear functions and examples 2 15

Illumination with multiple lamps pwr. x j θ ij r ij illum. y i n lamps illuminating m (small, flat) patches, no shadows x j is power of jth lamp; y i is illumination level of patch i y = Ax, where a ij = r 2 ij max{cos θ ij,0} (cos θ ij < 0 means patch i is shaded from lamp j) jth column of A shows illumination pattern from lamp j Linear functions and examples 2 16

Signal and interference power in wireless system n transmitter/receiver pairs transmitter j transmits to receiver j (and, inadvertantly, to the other receivers) p j is power of jth transmitter s i is received signal power of ith receiver z i is received interference power of ith receiver G ij is path gain from transmitter j to receiver i we have s = Ap, z = Bp, where a ij = { Gii i = j 0 i j b ij = { 0 i = j i j G ij A is diagonal; B has zero diagonal (ideally, A is large, B is small ) Linear functions and examples 2 17

Cost of production production inputs (materials, parts, labor,... ) are combined to make a number of products x j is price per unit of production input j a ij is units of production input j required to manufacture one unit of product i y i is production cost per unit of product i we have y = Ax ith row of A is bill of materials for unit of product i Linear functions and examples 2 18

production inputs needed q i is quantity of product i to be produced r j is total quantity of production input j needed we have r = A T q total production cost is r T x = (A T q) T x = q T Ax Linear functions and examples 2 19

Network traffic and flows n flows with rates f 1,...,f n pass from their source nodes to their destination nodes over fixed routes in a network t i, traffic on link i, is sum of rates of flows passing through it flow routes given by flow-link incidence matrix A ij = { 1 flow j goes over link i 0 otherwise traffic and flow rates related by t = Af Linear functions and examples 2 20

link delays and flow latency let d 1,...,d m be link delays, and l 1,...,l n be latency (total travel time) of flows l = A T d f T l = f T A T d = (Af) T d = t T d, total # of packets in network Linear functions and examples 2 21

Linearization if f : R n R m is differentiable at x 0 R n, then where x near x 0 = f(x) very near f(x 0 ) + Df(x 0 )(x x 0 ) is derivative (Jacobian) matrix Df(x 0 ) ij = f i x j with y = f(x), y 0 = f(x 0 ), define input deviation δx := x x 0, output deviation δy := y y 0 then we have δy Df(x 0 )δx when deviations are small, they are (approximately) related by a linear function x0 Linear functions and examples 2 22

Navigation by range measurement (x, y) unknown coordinates in plane (p i, q i ) known coordinates of beacons for i = 1,2, 3,4 ρ i measured (known) distance or range from beacon i beacons (p 1,q 1 ) (p 4,q 4 ) ρ 1 ρ 4 unknown position (x,y) ρ 3 (p 3,q 3 ) ρ 2 (p 2,q 2 ) Linear functions and examples 2 23

ρ R 4 is a nonlinear function of (x,y) R 2 : ρ i (x, y) = (x p i ) 2 + (y q i ) 2 linearize around (x 0,y 0 ): δρ A [ δx δy ], where a i1 = (x 0 p i ) (x0 p i ) 2 + (y 0 q i ) 2, a i2 = (y 0 q i ) (x0 p i ) 2 + (y 0 q i ) 2 ith row of A shows (approximate) change in ith range measurement for (small) shift in (x,y) from (x 0,y 0 ) first column of A shows sensitivity of range measurements to (small) change in x from x 0 obvious application: (x 0, y 0 ) is last navigation fix; (x,y) is current position, a short time later Linear functions and examples 2 24

Broad categories of applications linear model or function y = Ax some broad categories of applications: estimation or inversion control or design mapping or transformation (this list is not exclusive; can have combinations... ) Linear functions and examples 2 25

Estimation or inversion y = Ax y i is ith measurement or sensor reading (which we know) x j is jth parameter to be estimated or determined a ij is sensitivity of ith sensor to jth parameter sample problems: find x, given y find all x s that result in y (i.e., all x s consistent with measurements) if there is no x such that y = Ax, find x s.t. y Ax (i.e., if the sensor readings are inconsistent, find x which is almost consistent) Linear functions and examples 2 26

Control or design y = Ax x is vector of design parameters or inputs (which we can choose) y is vector of results, or outcomes A describes how input choices affect results sample problems: find x so that y = y des find all x s that result in y = y des (i.e., find all designs that meet specifications) among x s that satisfy y = y des, find a small one (i.e., find a small or efficient x that meets specifications) Linear functions and examples 2 27

Mapping or transformation x is mapped or transformed to y by linear function y = Ax sample problems: determine if there is an x that maps to a given y (if possible) find an x that maps to y find all x s that map to a given y if there is only one x that maps to y, find it (i.e., decode or undo the mapping) Linear functions and examples 2 28

Matrix multiplication as mixture of columns write A R m n in terms of its columns: A = [ ] a 1 a 2 a n where a j R m then y = Ax can be written as (x j s are scalars, a j s are m-vectors) y = x 1 a 1 + x 2 a 2 + + x n a n y is a (linear) combination or mixture of the columns of A coefficients of x give coefficients of mixture Linear functions and examples 2 29

an important example: x = e j, the jth unit vector e 1 = 1 0. 0, e 2 = 0 1. 0,... e n = 0 0. 1 then Ae j = a j, the jth column of A (e j corresponds to a pure mixture, giving only column j) Linear functions and examples 2 30

Matrix multiplication as inner product with rows write A in terms of its rows: A = ã T 1 ã T 2. ã T n where ã i R n then y = Ax can be written as y = ã T 1 x ã T 2 x. ã T mx thus y i = ã i,x, i.e., y i is inner product of ith row of A with x Linear functions and examples 2 31

geometric interpretation: y i = ã T i x = α is a hyperplane in Rn (normal to ã i ) y i = ã i,x = 0 ã i y i = ã i,x = 3 y i = ã i,x = 2 y i = ã i,x = 1 Linear functions and examples 2 32

Block diagram representation y = Ax can be represented by a signal flow graph or block diagram e.g. for m = n = 2, we represent [ ] [ y1 a11 a = 12 a 21 a 22 as y 2 ] [ x1 x 2 ] x 1 a 21 a 11 y 1 x 2 a 12 a 22 y 2 a ij is the gain along the path from jth input to ith output (by not drawing paths with zero gain) shows sparsity structure of A (e.g., diagonal, block upper triangular, arrow... ) Linear functions and examples 2 33

example: block upper triangular, i.e., A = [ ] A11 A 12 0 A 22 where A 11 R m 1 n 1, A 12 R m 1 n 2, A 21 R m 2 n 1, A 22 R m 2 n 2 partition x and y conformably as x = [ x1 x 2 ], y = [ y1 y 2 ] (x 1 R n 1, x 2 R n 2, y 1 R m 1, y 2 R m 2 ) so y 1 = A 11 x 1 + A 12 x 2, y 2 = A 22 x 2, i.e., y 2 doesn t depend on x 1 Linear functions and examples 2 34

block diagram: x 1 A 11 y 1 A 12 x 2 A 22 y 2... no path from x 1 to y 2, so y 2 doesn t depend on x 1 Linear functions and examples 2 35

Matrix multiplication as composition for A R m n and B R n p, C = AB R m p where c ij = n a ik b kj k=1 composition interpretation: y = Cz represents composition of y = Ax and x = Bz z B x A y z AB y p n m p m (note that B is on left in block diagram) Linear functions and examples 2 36

Column and row interpretations can write product C = AB as C = [ c 1 c p ] = AB = [ Ab1 Ab p ] i.e., ith column of C is A acting on ith column of B similarly we can write C = ct 1. c T m = AB = ãt 1 B. ã T mb i.e., ith row of C is ith row of A acting (on left) on B Linear functions and examples 2 37

Inner product interpretation inner product interpretation: c ij = ã T i b j = ã i,b j i.e., entries of C are inner products of rows of A and columns of B c ij = 0 means ith row of A is orthogonal to jth column of B Gram matrix of vectors f 1,...,f n defined as G ij = f T i f j (gives inner product of each vector with the others) G = [f 1 f n ] T [f 1 f n ] Linear functions and examples 2 38

Matrix multiplication interpretation via paths x 1 b 11 z 1 a 11 y 1 b 21 a 21 x 2 b 21 b 22 z 2 a 21 a 22 y 2 path gain= a 22 b 21 a ik b kj is gain of path from input j to output i via k c ij is sum of gains over all paths from input j to output i Linear functions and examples 2 39