Example: barber

Lecture3 LinearEquationsandMatrices

Lecture 3 linear equations and matrices linear functions linear equations solving linear equations3 1 linear functionsfunctionfmapsn-vectors intom-vectors islinearif it satisfies: scaling: for anyn-vectorx, any scalar ,f( x) = f(x) superposition: for anyn-vectorsuandv,f(u+v) =f(u) +f(v)example:f(x) =y, wherex= x1x2x3 ,y= x3 2x13x1 2x2 let s check scaling property:f( x) = ( x3) 2( x1)3( x1) 2( x2) = x3 2x13x1 2x2 = f(x) linear equations and Matrices3 2 Matrix multiplication and linear functionsgeneral example:f(x) =Ax, whereAism nmatrix scaling:f( x) =A( x) = Ax= f(x) superposition:f(u+v) =A(u+v) =Au+Av=f(u) +f(v)so, matrix multiplication is a linear functionconverse:everylinear functiony=f(x), withyanm-vector andxandn-vector, can be expressed asy=Axfor somem nmatrixAyou can get the coefficients ofAfromAij=yiwhenx=ejLinear equations and Matrices3 3 Composition of linear functionssuppose m-vectoryis a linear function ofn-vectorx, ,y=AxwhereAism n p-vectorzis a linear function ofy, ,z=BywhereBisp a linear function ofx, andz=By= (BA)xsomatrix multiplicationcorresponds tocompositionof linear functions, , linear functions of linear functions of some variablesLinear equations and Matrices3 4 linear equationsan equation in the variablesx1.

Linear Equations and Matrices 3–9. when A isn’t invertible, i.e., inverse doesn’t exist, • one or more of the equations is redundant (i.e., can be obtained from the others) • the equations are inconsistent or contradictory (these facts are studied in linear algebra)

Tags:

  Linear, Equations, Matrices, Linear equations and matrices, Linearequationsandmatrices

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Lecture3 LinearEquationsandMatrices

1 Lecture 3 linear equations and matrices linear functions linear equations solving linear equations3 1 linear functionsfunctionfmapsn-vectors intom-vectors islinearif it satisfies: scaling: for anyn-vectorx, any scalar ,f( x) = f(x) superposition: for anyn-vectorsuandv,f(u+v) =f(u) +f(v)example:f(x) =y, wherex= x1x2x3 ,y= x3 2x13x1 2x2 let s check scaling property:f( x) = ( x3) 2( x1)3( x1) 2( x2) = x3 2x13x1 2x2 = f(x) linear equations and Matrices3 2 Matrix multiplication and linear functionsgeneral example:f(x) =Ax, whereAism nmatrix scaling:f( x) =A( x) = Ax= f(x) superposition:f(u+v) =A(u+v) =Au+Av=f(u) +f(v)so, matrix multiplication is a linear functionconverse:everylinear functiony=f(x), withyanm-vector andxandn-vector, can be expressed asy=Axfor somem nmatrixAyou can get the coefficients ofAfromAij=yiwhenx=ejLinear equations and Matrices3 3 Composition of linear functionssuppose m-vectoryis a linear function ofn-vectorx, ,y=AxwhereAism n p-vectorzis a linear function ofy, ,z=BywhereBisp a linear function ofx, andz=By= (BA)xsomatrix multiplicationcorresponds tocompositionof linear functions, , linear functions of linear functions of some variablesLinear equations and Matrices3 4 linear equationsan equation in the variablesx1.

2 , xnis calledlinearif each side consistsof a sum of multiples ofxi, and a constant, ,1 +x2=x3 2x1is a linear equation inx1, x2, x3any set ofmlinear equations in the variablesx1, .. , xncan berepresented by the compact matrix equationAx=b,whereAis anm nmatrix andbis anm-vectorLinear equations and Matrices3 5 Exampletwo equations in three variablesx1, x2,3:1 +x2=x3 2x1, x3=x2 2step 1:rewrite equations with variables on the lefthand side, lined up incolumns, and constants on the righthand side:2x1+x2 x3= 10x1 x2+x3= 2(each row is one equation) linear equations and Matrices3 6step 2:rewrite equations as a single matrix equation: 2 1 10 1 1 x1x2x3 = 1 2 ith row ofAgives the coefficients of theith equation jth column ofAgives the coefficients ofxjin the equations ith entry ofbgives the constant in theith equationLinear equations and Matrices3 7 Solving linear equationssuppose we havenlinear equations innvariablesx1.

3 , xnlet s write it in compact matrix form asAx=b, whereAis ann nmatrix, andbis ann-vectorsupposeAis invertible, , its inverseA 1existsmultiply both sides ofAx=bon the left byA 1:A 1(Ax) =A side simplifies toA 1Ax=Ix=x, so we ve solved the linearequations:x=A 1bLinear equations and Matrices3 8so multiplication bymatrix inversesolves a set of linear equationssome comments: x=A 1bmakes solving set of100linear equations in100variableslooksimple, but the notation is hiding a lot of work! fortunately, it s very easy (and fast) for a computer to computex=A 1b(even whenxhas dimension100, or much higher)manyscientific, engineering, and statistics application programs from user input, set up a set of linear equationsAx=b solve the equations report the results in a nice way to the userLinear equations and Matrices3 9whenAisn t invertible, , inverse doesn t exist, one or more of the equations is redundant( , can be obtained from the others) the equations are inconsistent or contradictory(these facts are studied in linear algebra)in practice:Aisn t invertible means you ve set up the wrong equations , ordon t have enough of themLinear equations and Matrices3 10 Solving linear equations in practiceto solveAx=b( , computex=A 1b) by computer, we don t computeA 1, then multiply it byb(but that would work!)

4 Practical methods computex=A 1bdirectly, via specialized methods(studied in numerical linear algebra)standard methods, that work for any (invertible)A, require aboutn3multiplies & adds to computex=A 1bbut modern computers are very fast, so solving say a set of1000equationsin1000variables takes only a second or so, even on a small computer.. which is simplyamazingLinear equations and Matrices3 11 Solving equations with sparse matricesin many applicationsAhas many, or almost all, of its entries equal to zero,in which case it is calledsparsethis means each equation involves only some (often just a few) of thevariablessparse linear equations can be solved by computer very efficiently, usingsparse matrix techniques(studied in numerical linear algebra)it s not uncommon to solve for hundreds of thousands of variables, withhundreds of thousands of (sparse) equations , even on a smallcomputer.

5 Which istruly amazing(and the basis for many engineering and scientific programs,like simulatorsand computer-aided design tools) linear equations and Matrices3 12


Related search queries