Download as pdf
Download as pdf
You are on page 1of 13
QUIZ -1 MA423: Matrix Computations Time : 50 minutes 20 marks September 1, 2022 Answer ALL questions ~ A Let 2 € F(3.t,L,U) be such that B°-! 0 such that M(x + y) > 2? Next when x = 10 nallest y > 0 syeh that f(r + y) > + Hege f(x) uses round to nearest rounding mode, 4 AF 4 marks Let A= LU be the LU factorization of a non-singular matrix A € R"*", where [is unit lower triangular and U is upper triangular. Let Ay denote the k x k leading principal submatrix of Atk det(AL) oy det(Ag-1) a AR" be nonsingular, Let u € R" and v € R" be such that A+ wo” is nonsingular. ‘Then by Sherman-Morrison formula we have what is the sn kea2in 4 marks n~ 1, Show that wa = ayy ancl wee ATtwT A-! . Teetaste . (twit = \ Given the LU factorization A = LU, describe an efficient algorithm (outline only the steps) for solving (A + uv" jx = b and determine the flop count, 4 marks A Let A € RM” ig nonsingular. Describe an efficent algorithm (outline only the stepe) based yr on Gaussian elimination for solving the problem A!z = b and determine the flop count kd + De 4 marks PSone that A € R"*" is symmetric positive definite. Partition A as 2-by-2 block matrix and he the fact that A lo F-Le% 1B ode] M4 w B to prove the existence of Cholesky factorization of A, where a € R,w € RY! and Be Reo th 2 ay Bo wpe GBT a Unt Sai oc 4B. 2 x bk (As 94) 2b lp see Bud #4 . Quiz -1 MA423: Matrix Computations Time : 40 minutes 20 marks September 8, 2023 Answer ALL questions + Let € F(3,6,.L,U) be such that! 0 such that M(x + y) > 2? Next when x = 10!5, what is the sinallest y > 0 such that A(x + y) > 7. Here fi(r) uses round to nearest rounding mode 5 marks be an ¢ problem AM = b and determine jent algorithm (outline only the steps) based «Ae Let Ae RY" iS nonsingular. Des he flop count on Gaussian elimination for solving 5 marks 3. Consider the system Ax = b, where A € R"*" is nonsingular and 6 € BR". Suppose that A+AA is nonsingular. Now consider the system (A + AA)i = b + Ab. Show that ‘< cond(A) (Gat as abi ) , lle = Wall Al © Al lel where cond(l) := Al) JA). 5 marks 4. Consider A 1° i + where 0 and be RM, Suppose that rank(A) j. Show that Pav Proaes* Psi ME) = Mi(Pat Pao PesrG)Pat Pager Poor Finally, let A € R5*5 be nonsingular. Then applying GEPP on A produces: Mz" PaM;'PyMz'P,My'P,A = U, where Px is the permutation matrix and M, is the Gaussian elimination matrix used at the k-th step. Deduce that PyPsP,PA = LU, where L is unit lower triangular and U is upper triangular, Determine the matrix L. 10 marks 3. Let A € R"*" be nonsingular. Let C ¢ R**" and B € R"*?, Describe an efficient Gaussian elimination based algorithm for computing CA-"B. You should describe your algorithm (outline only the steps) and determine the flop count. 5 marks 4, Let A € R"™" be symmetric positive definite and u € R" be a nonzero vector. Show that A+ uu" is symmetric positive definite and that At uu = GU + 0v")GT for some v € R", where A = GG" is the Cholesky factorization of A. Determine v and describe an algo- rithm (outline only the steps) for solving the system (A +uu")x = b assuming that the Cholesky factorization of A is already computed. Also, determine the flop count. 15 marks 5. Let Ae C™*" and be C™. Set r Ax. Then show that x is a solution of the LSP Im A} [r] _ [2 Acsb > 1. 6112] = lol . 4 marks P.T.O a [a oy so Tavv ~ ™ Wow 3s) Si Ne 4 vs yor \ \) ag’ 6. Let A € R'™™, m > n, and b € R™. Suppose that rank(A) = n. Let [A = QR bea Re QR factorization. Show that R is of the form R = |0 d], where R € R"*” is upper pak( een 0 0 wna triangular and nonsingular, ¢ € R" and d € R. Describe an algorithm (outline the steps with justification) for solving the LSP Az ~ 6 using QR factorization of the augmented matrix [A 6]. Show that |d| is the residual error. 12 marks *** Bnd *** pits Quiz -11 40 minutes 20, marks 1. Prove or disproxe (with justification o ple) the foley 6) Let oy ae va Then deta) =| 1 ark (P) Let H © ©" be proper upper Hessenberg, Lew \ be a MH. Then dim NU = A vanes 2 Let AE C2 with ue > a. Let 4.0m be single wales of A. Shin tat dhe vanes of [4] ae eat wo ea} tn Jt 4 vanes , b s tue Moor Fenrose preudrinvense of A= [2] anistve we sae |) enim of A= | iy nt 40 aarks dba be st hal sa bee QR tact respective. fn exiet arate. Sh 4 inarks rae Cast tio on os bad nd Gyo ie 2 ara (hs “A fp bad fpull tel Aan then ae tla ~ e , we “ vss ate (rt Ayn” ° at oe gp ne aUAM fel Ae USP, ot since Arb ane actuenipet 7 hour cr fit vals, cus . Zee (te Edin Bin te tel”) X5 y "4 nd "Yee oy (setae) SE 9 KE QUIZ - IT MA423: Matrix Computations Time : 40 minutes 20 marks November 7, 2023 Answer ALL questions 1. Let A € C”™" be such that rank(A) =n. Let o;in(A) denote the smallest singular value of A. Show that ||(A*A)~1 A" J] = 1/ouin(A) and |[A(A* A)~! A" lp = 1 6 marks # 2. Let uw € R" be a unit vector, Consider the Householder reflector H := J — 2uu". Determine all the eigenvalues of H and their algebraic multiplicities. Also determine all the eigenvectors. 5 marks PAs Let Ae C"" and o > 0. Show that o is a singular value of A <=> 4), ae is singular. 4 marks 4. Let A € R"*" be proper upper Hessenberg and Ag be the result of 3 basic QR steps on A, that is, Ana = QuRey Ak = ReQu for k = 1,2,3, with Ag = A. Set R= RyRyR, and Q:= Q1Q2Qs. Show that A? = QR and As=Q’AQ. ~ 5 marks Ahr 4 Ry RR, ** Bud *** oD w \ Ru Be s FH Oe Pe Oy al KR End Semester Examination 1A 423: Matrix Computations Time : 3 hoitrs 50 marks November 24, 2022 Answer ALL questions 2} ERE Determine rotation G € R?*2 and [ys ye)” € RE such that [r] = mn and = oe 4 marks ier be R™ and A € R™*" be such that rank(A) =r < min(sn. an). For a fixed > 0. derive all the normal equation for th tion problem e min (Ax — 693 + plla[l3) L see and show that it has.a unique solution x4. Determine 2. Next, use SVD of A to show that Jim,,.04), = A*b, where A* is the Moore-Penrose pscudo-inverse of A. pose that A € C"*" and rank(A) = n. [fr and # are the , and Ai = b + 5b, respectively, then show that ille _ cond(A) lsblly < Re) Wl | os [lla petween hand Ar, and cond( A) := \Ate (Al. Here At is the inverse of A. 5 marks vl w= ovtluhs Peon j te? TD alk fram Ww : nefoe sore ¥ “\hon 0 2 © ia 4% eo > 0 9 + a ° % ° 4 GS: Det whether #7 ig.ggluum stochastic or column sub-stochastie, Write down the Guosk — iyatrix G of the web grapirtarte< a < 1 Sern Let T € R"*" be tridiagonal and symmetric and be given by TU.j) =a, for y= 1 su and TU.541) = TU 41) = 3h #0 or) = Lin 1, Show that pom ay $5~sgni5}f HE is the Wilkinson's shift for T, where 6 := (a,—) algorithin for T with Wilkinson shift 1 ~ On)/2. Describe one step of implicit QR 7 marks ee ee SS ee ee eee Oe ee : "Sb +b “yy sb ® Ach. wd 28h 2 OK =A 2 [e-FUl, s Uatedlle Wen sel, 2 * palo tay we > [ck ¢ cond) 7 Soll, Ww wo Wall, \Woull, 0 Ro & Arzh 3D Mh > MAKI, & Hah Mall, ~> bh, cose < Alyx, => Lewbing 1) & Oy ve gab, $211 (2b [l We Bile, eond(a) a x a Tal, 56 \ell a | Zeno is cond{A) := ||Alfsi}A~4}2-Show-that— : AeéeC""" be nonsingular. 1 L ¥ = IX ~ All 1 ** *| . v 5 {UX Ale, 9 is deter lsu / on nin { Tale xX EC is singul a} cond) 6 Construct a singular matrix X such that [[X — Alb/|lAlle = I/cond(A). 5 marks ©) & T €C"*" be upper triangular with distinct diagonal cutries. Outline an algorithm (out- line the steps with justification) for computing n linearly independent eigenvectors of T and determine the total flop count. 5 marks 8. Let A € R"*" be upper Hessenberg. Consider the QR step A - p= QR and Ay = RQ + pl Show that Ay = Q"AQ. Show that A; is upper Hessenberg when A is nonsingular and that Ay need not be upper Hessenberg when A is singular 6 marks \" Describe power method for computing an Sigenvale and a corresponding eigenvector of A. Assume that A has n distinct eigenvalues A....,4n such that [Aj > [Ag] > == > [An |. Show ye NAS for almost every choice of the starting vector zo € C”, the iterate 4, converges to an a ps \__cigenvector corresponding to A, at the rate 2! 5imarks \\a Dil < 1 >. sec taa om fone — AHR AT) End Semester Examination MA 423: Matrix Computations ‘Time : 3 hours 40 marks November 22, 2023 Answer ALL questions << min(m,n) and 6 € €". Define the Moore: Penrose on of the LSP Ax = b having the F 6 marks that rank(A) 1, Let Ae C™*™ be sux pecuddo-inverse At of A and show that A*b in untigue s0 poelleet norm, Use SVD of A to show (hat Hity.yoy (ATA + pln) 'A* "=", Use GIR factorization of A to prove the Hadamard’s deter 2 Ltd a] € rinant inequality deu(A)] < TT laste ca where det(A) is the determinant of A. 4 marks Ale AE C™,bEC™ and AbE C™, Let and # be unique solutions (with sm ef the LSP z= band LSP Az ~ 6+ Ad, respectively. Show that 7 lle ale cond( A) [bs Tala < cond [bl * where @ is the acute angle between b and Az, and cond() Moare-Penrose pseudo-inverse of A allest norms) = ||A* la Alla. Here A* is the 4 marks 1 01 4. Compute QR factorization of A= | -2 -1 0 | in two diferent ways using Householder 2 21 reflectors and classical Gram-Schmidi method. 6 marks 5. Let Ae R™" be upper Hessenberg. Consider Show that A) is upper Hessenberg when 1 i decomposition of A ~ yl is computed using rotations then Ay aan eigenvalue of A. 6: Let Ae R™" and s € C. Suppose that s is not an eigenvalue of A. Perform two steps of ‘explicit QR algorithm on A with shifts s and its complex conjugate Aqsl = QR, Ar =RiQi+st Ay~ 31 = QaRay Ar = RaQa +31. ‘Show that Q, and Qz ean be chosen such that Q1 Qe is real. Deduce that in such a case Ay is complex and Az is real. Describe an algorithm (outline the steps) for computing Az directly from A without computing Ay thereby avoiding complex arithmetic. 5 marks 7, Describe an algorithm (outline the steps) for reducing a matrix A € R"*" to an upper bidi- agonal form B- Describe a single step of Golub-Kahan implicit QR algorithi for computing SVD of B when B is proper upper bidiagonal. 5 marks 8, Write an algorithm (outline the steps) that implements inverse power method for computing dan eigenvalue and a corresponding eigenvector of nonsingular matrix A € C™*". Determine the flop count for performing, é steps of inverse power method. Suppose that A has n distinct Phy such that [Ay] 2 -*+ 2 [Aneal > [Anke Let Atm = Anty and ty #0. Let eigenvalues As, Fo be w nonzero veetor such that (zo, Ux) # 0. Show that the iterate 2, obtained from inverse [nal power method with starting vector 29 converges to a scalar multiple of vy at the rate “2-H Vaal 5 marks the QR step A— pl = QR and Ay = RQ + ul. NOT an eigenvalue of A. Show that if the QR is upper Hessenberg even if yi 5 marks a” at 90 Bad End Semester Exan MA 423: Matrix Computations Lab Full marks. 30 ‘Time: 3 hours Date: Novetnber 16, 2023. Answer all questions. OVA). n(A) and o(A+E),.-.,0n(A+E) be the singular values of nn matrices A and A+ E, respectively. Then |o,(A + B) ~ 0j(A)| < [\Ella for j = 1: 0. Cheek this bound numerically. Consider the matrix A= gallery(’ frank’, 12) and define a 1212 random matrix E with [Ell = 10%, Now compute singular values of A and A+ £, and compute the errors |a,(A + EB) ~ 0j(A)| for j= 1: 12 and prepare a table. Do the errors validate the bounds? Next, compute the relative errors |@,(A +E) ~ 0,(A)|/,(A) for J = 1:12 and prepare a table. What do you observe? 5 marks 2. Find polynomials of degree 10 that best fit the function f(t) = 1/(1 +252) at 50 and 100 equally-spaced points ¢ between —1 and 1. Set up the LSP Az = b and determine the polynomials (coefficients) in two different ways: (a) By using the MATLAB command x = A \ > (which uses a QR factorization) (b) By solving the normal equations AT Ar = ATb. Plot the data points, the function f(t) and two polynomials obtained for 50 data points in a single plot. Do the same for 100 points in a separate plot. Compute the residual norm in each case and comment. on the results. 5 marks 3. Write a MATLAB function [x,mu] = powermethod(A,x0,W) for performing N iterations of Power method (2; = Azy—1,25 € 23/llxsll2,4j = 2}Az;) for finding the dominant eigenvalue of a matrix A with starting vector x0 such that |jx0]l2 = 1. Here iterates x is an nx N matrix such that x(:,j) is the vector obtained at the end of the j-th iteration and mu is a vector of size N such that mu() is the Rayleigh quotient x, = x} Ar, obtained at the end of j-th iteration. We know that 1) approximates the dominant eigenvalue of A and 2, approximates a corresponding eigenvector. Consider the matrix 24347 0.8641 1.4661 A= | 0.8641 2.6630 ~3.1263 1.4661 3.1263 6.9023 and computes its eigenvalues using MATLAB command eig, Does it have a dominant ‘Now run the above program with x0 = (1,1, 1)" for your own choice of N. In how many iterations do you see convergence of j1; to the dominant eigenvalue’ ‘The vector v = (0.2507, ~0.4556, 0.8542}" is a normalized eigenvector of A corresponding to the dominant eigenvalue. Thus if y := x0 — (x0,v)», then y has uo component in the direction of v in exact arithmetic. Repeat the above experiment with x0 := y and keep increasing the value of N. Explain justification what you observe now. “10 marks 1. Numerically, an « is real if the fumaginnry: port is negligible. Consider SiXT At cule fragment A = randn(8); sum( abs( imag ( eig(A) ) ) < 1-e-12) What output does this code fraginent return’? Justify your answer Generate 1000 randon ally distributed) ces of size 10. Run the code fragment on these matrices and prepare a histogram (use command bistogram). What information do yon get from the histogram? Can you guess the probability of the outcou a expectations from the histogram? ‘sand th 5 marks 5. Determine the hyperlink matrix Hf of the web graph given by Determine whether H is column stochastic or column sub-stochastic. Write down the Google matrix G:= a$+(1~a)E of the web graph for a = .85. Compute the PageRank vector and determine the ranks of the webpages 5 marks Submission instruction: Prepare a detailed report answering each question. Include plots and numerical results in your report. You should submit ALL your MATLAB programs. Your report can be in a single file (doc or pdf) or separate file for each question.

You might also like