Page Lab Eleentary Matri and Linear Algebra Spring 0 Nae Due /03/0 Score /5 Probles through 4 are each worth 4 points.. Go to the Linear Algebra oolkit site ransforing a atri to reduced row echelon for http://www.ath.odu.edu/~bogacki/cgi-bin/lat.cgi?crref where you can enter an n atri and the progra will display a sequence of row operations that reduces the atri to reduced row echelon for. Use this progra to solve the following linear syste. + 3 + 4 + 3 + 3 34 0 + 3 64 + 63 34 7 Printout and attach the output. Fro the results state the coplete solution 3 4. Go to the Linear Algebra oolkit site Calculating the inverse using row operations http://www.ath.odu.edu/~bogacki/cgi-bin/lat.cgi?cinv where you can enter a square atri. If the n n atri is nonsingular, the progra calculates the inverse. Use this progra to find 3 5 6 Click on the link that reads can be transfored by a sequence of eleentary row 7 3 4 operations to show the steps. Printout and attach the output. Now use the inverse to solve the following systes: + y 3z 8 + 5y + 6z 35 7 3y + 4z 4 y z + y 3z a + 5y + 6z b 7 3y + 4z a+ b y z //0 Madison Area echnical College
Page Lab Eleentary Matri and Linear Algebra Spring 0 3. he Linear Algebra oolkit uses eact integer arithetic to perfor calculations, so only integer or fraction input is allowed. his has disadvantages if the atri has its origins in data where a decial representation is ore typical. he Matri Algebra ool V. at the site http://www.zweigedia.co/realworld/atrialgebra/fancyatrialg.htl uses an interface siilar to Matlab and allows decial input. Use the Eaple button to eaine input synta. Note that atrices are input in the white space above the Forulas: he calculations you wish to perfor on the atrices are entered in the Forulas line. When you press the Copute button the results of the calculations are displayed in botto white space. Use this progra to solve the following syste of equations:.5 0.387y +.54z 0.995.5 + 3.65y +.7z 3.5 4.3.9y + 7.38z 0.450 Printout and attach the output. Fro the results state the coplete solution y z 4. Solve each of the following three equations for z. y z + y + z y + z 8 a) In Winplot open the 3-di window. For each forula for z above enter an Eplicit function in the Equa/Eplicit enu. Fro View pick Aes to get a better 3D perspective of the surfaces. Be sure to use a different color for each surface. his is chosen under color of the Equa/Eplicit enu. Solve this syste of equations and enter the coordinates of the solution using the Equ/Point/Cartesian enu. Be sure the color of this point is distinct fro the color of the three surfaces. Use PgUp (or the View Menu) to "zoo in" and the left and right arrow keys to rotate the graph until you get a "good view" which clearly shows the three surfaces and the solution point. Print and attach your graph. What kind of geoetric surfaces does each equation describe? What is the significance of the solution point with respect to the three surfaces? //0 Madison Area echnical College
Page 3 Lab Eleentary Matri and Linear Algebra Spring 0 b) Now solve each of the following three equations for z. y z + y + z 3 + 3y + z For each forula for z above enter an Eplicit function in the Equa/Eplicit enu. Fro View pick Aes to get a better 3D perspective of the surfaces. Be sure to use a different color for each surface. Show that this syste is consistent with infinitely any solutions along a line. Deterine the for of this solution. In this for let z t where t is any real nuber. Solve for and y and in ters of t. In Winplot use the Equa/Curve enu to enter the for of the infinitely any solutions. Set t lo -5and t hi 5. Set the pen width to and choose a doinant color to ake this curve ore proinent. Use PgUp (or the View Menu) to "zoo in" and the left and right arrow keys rotate the graph until you get a "good view" which clearly shows the three surfaces and the line of solutions. Print and attach your graph. What kind of geoetric surfaces does each equation describe? What is the significance of the line of solutions with respect to the three surfaces? //0 Madison Area echnical College
Page 4 Lab Eleentary Matri and Linear Algebra Spring 0 Do one of the following three probles for nine points. You ay do etra probles to earn up to a total of 8 etra lab points. 5. Newton s ethod in ultiple diensions. he Background For functions of a single variable the equation f ( ) 0 can be solved approiately by an iteration known as the Newton Raphson ethod. he ethod can be derived fro the linear or tangent approiation to f ( ). Suppose we have an initial guess n to a solution or root of f ( ) 0. he linear approiation about n is f ( ) f ( ' n) + f ( n)( n) if we set f ( ) 0 this gives an f ( n ) f ( n ) equation for the change Δ n which gives the recursion f ' n+ n. If the f ' ( ) n Δ ethod works the relative error of the approiation becoes very sall as we iterate. Whether in n fact this happens usually depends on the initial guess 0. If the derivative vanishes at the desired root, the ethod can be very inefficient or actually divergent. Now consider the syste of equations in variables ( ) vector notation,,, linear approiation to equation j becoes f ( ) f ( ) + ( ) ( ) f,,, 0for j. Adopting the j with vector length,,,,,, j, the j j f j j n ( i i i n i ), where the partial n n F f j n by Fji, i n n n n and the colun Δ i i n. he linear approiation to equation j can now be written as the j th row of a i f j fj n + FjiΔi. Since we want fj ( ) 0, this yields the syste of linear i derivatives are evaluated at ( ),( ),,( ). Define the atri ( ) where again the partial derivatives are evaluated at ( ), ( ),, ( ) vector ( ) atri product ( ) ( ) equations FΔ b, where the colun vector b is given by bj fj( n). If the Jacobian atri F is nonsingular then there is a unique solution Δ F b. his leads to the recursion n+ ( n) +Δ, ( n) +Δ,,( n) +Δ As in diension we iterate until the relative error Δ given by the ratio becoes very sall and convergence of the ethod depends on the initial guess n,,,. ( ) ( ) ( ) 0 0 0 0 n //0 Madison Area echnical College
Page 5 Lab Eleentary Matri and Linear Algebra Spring 0 he Proble 36ysin( π ) 6 + 45y he syste of equations has three solutions: one at the origin, one in the y( 9 e 5) 6y 6( e ) third quadrant and one in the first quadrant. Using Newton s ethod, approiate the solution in the first 6 quadrant to a relative error saller than0. Depending on your initial guess you ay need ore or less than 6 iterations. Record your results in the following table. Prograing the ethod into Ecel or a graphing calculator will ake this calculation anageable. As you approach the solution the quantity ( ) ( ) f, y + f, y should approach zero. n n y n Δ 0 3 4 5 6 Δ y Δ +Δy n + yn ( ) ( ) f, y + f, y 6. he Least Squares solution to over deterined linear systes. he Background Consider the syste of linear equation in n unknowns with > n. In atri for this is epressed as A b where A is an n atri, is an n colun vector and b is an colun vector. We will assue that A has colun rank of n. his eans that in reduced row echelon for A has n nonzero rows followed by -n rows of zeros. In general for an arbitrary colun vector b the syste A b would be inconsistent, i.e., the reduced row echelon for of the augented atri [A b] would not have all zeros in the botto -n rows of the last colun. hus, for ost choices of b there is no that solves the syste. However, there is an that iniizes the distance between A and b. his is called the least squares solution of the syste. he squared distance fro b of A is a function of the n coordinates in and is given by the epression n n n n f ( ) b A ( bj ( A) ) ( ) j bj Ajii bj bj Ajii + Ajk k Ajii j j i j i i k n n n n n n b b bjajii + AkjA ji ik b b bjajii + ( A A) ik ki j i i k j j i i k For fied b the distance fro A to b has no upper bound, but it ust have a iniu since it is bounded below by zero. he partial derivatives of f with respect to each coordinate of ust vanish at the value of //0 Madison Area echnical College
Page 6 Lab Eleentary Matri and Linear Algebra Spring 0 that iniizes ( ) f. Now k δ and A A is a syetric atri so that kj j n n n f i i k ba j ji + ( AA) k + i p ki j i p i k p p n n n n n ba j jiδip + ( AA) ( δipk + iδkp ) ba j jp + ( AA) k + ( AA) i ki kp pi j i i k j k i n n Apjbj ( A A) k ( A A) k ( A A Ab) + + ( ) pk pk j k k f At the iniizing value of, for each p between and n 0. hus the iniizing value of ust p 0 satisfy the equation ( A A) A b where the colun vector of zeros is n. Now, if the row rank 0 of A is n, A is row equivalent to an RREF atri which in partitioned for has I n above n rows of In zeros. o be ore precise there is an eleentary atri E such that EA. 0 n, n b b hus, the equation A A b is equivalent to n b b In In b EA EA E and if b 0 this leads to 0 n, n 0 n, n 0 n, n n b 0 0 n 0 0 EA. So the equation A 0 has only the trivial solution,. 0 0 0 n, n 0 0 0 For any consider ( ) ( ) ( ) ( ) ( ) (( ) ) A A A A A A, i i, A A i, i, A. i, i i i n p //0 Madison Area echnical College
Page 7 Lab Eleentary Matri and Linear Algebra Spring 0 If A A is the n zero vector, then 0 ( ) A A so ( A) i, i only equal to zero if each ter is zero. hus, each ( ), 0 i 0. Now a su of real squares is A or A 0. But A 0 has only the trivial solution, so A A 0 also iplies that is the trivial solution. herefore A A is nonsingular. hus, there is a unique least squares solution to the equation ( ) he Proble A A A bgiven by ( ) a) Show that if n that the least squares solution actually solves A b. A A A b. b) Find the solution in the least squares sense of the following proble: y ˆ y β 0 3 y3. ˆ β y ˆ 0 β ˆ β //0 Madison Area echnical College
Page 8 Lab Eleentary Matri and Linear Algebra Spring 0 7. Solving tridiagonal linear systes he Background A square atri A is called tridiagonal if all of the eleents in positions ore than one diagonal reoved ai if i j 0 ci if i j fro the ain diagonal are zero. More precisely Aij,. A scheatic of such a di if i j 0 if i j > a d 0 0 0 c a d 0 0 0 c3 a3 d3 0 tridiagonal atri is A. Now the linear syste A b for an n 0 0 0 0 0 cn an d n 0 0 0 cn a n colun vector b can be solved using Gaussian eliination. A uch faster procedure however is to use a b recurrence. We will assue that none of the a s are zero. Fro the first row d. Assue that a d we can find γi and βiwith i i βi i+. his leads to a recurrence for γ i in ters of γi ai, ci, di and γi and a recurrence for β i in ters of bi, ci, γi and βi with the initial b conditionsγ a and β. hus, fro A and b values can be obtained forγi and βiwith i n. a d Furtherore, it s not difficult to show that n βn. he backwards recurrence i i βi i+ then γi calculates the solution for i running fro to n. he Proble Solve for the recurrence relations of γi and β i. recurrence relation of γ i : recurrence relation of β i : //0 Madison Area echnical College
Page 9 Lab Eleentary Matri and Linear Algebra Spring 0 Apply this ethod to solve the following syste of equations. 3.4 3. 0 0 0 0 0 0 0 0 0 0 0 6.0.9.8 0 0 0 0 0 0 0 0 0 0 5.0 0 4.5 6..9 0 0 0 0 0 0 0 0 0 3 5.40 0 0 3.5 5.3 5.8 0 0 0 0 0 0 0 0 4 8.60 0 0 0.7 9.4. 0 0 0 0 0 0 0 5 3.50 0 0 0 0 5..4 9 0 0 0 0 0 0 6 0 0 0 0 0 8.3 0.55 3. 0 0 0 0 0 7 9.30 3.65 0 0 0 0 0 0 4. 7. 6.6 0 0 0 0 8 65.60 0 0 0 0 0 0 0 6.9 9.6 4.89 0 0 0 9 0.93 0 0 0 0 0 0 0 0 7. 8.5 8.3 0 0 0 34.8 0 0 0 0 0 0 0 0 0 0.35.9 7.5 0 3.05 0 0 0 0 0 0 0 0 0 0 4.89 4. 0.7 3.73 0 0 0 0 0 0 0 0 0 0 0 3.3 0.54 3 8.76 Use Ecel or a graphing calculator to coplete the entries in the following table. State decial solutions to the nearest ten thousandth. i a i c i d i b i γ i 3 4 5 6 7 8 9 0 3 β i i //0 Madison Area echnical College