1. Suppose that a matrix A has a factorization of the form A = BBT, with...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Suppose that a matrix A has a factorization of the form A = BBT, with B nonsingular. Show that A must be a) symmetric, and b) positive definite, that is, xAx> 0 for x/= 0. Matrices with both these properties are called symmetric positive definite (SPD) matrices, and they are an important class of matrices. In this question, you shall develop a special form of LU factorization for them. 3. Generalizing the previous part, find an algorithm that computes the Cholesky factor L for a given symmetric, positive-definite matrix A of size nxn. Hints: a) Start with 111 and proceed through rows. b) Finish computing each row of L before moving on to the next one. c) Only one half of the matrix (lower half) A needs to be accessed. 4. Implement the algorithm devised in previous part, and run it on three random SPD matrices of size 20 x 20. Here is some Python code to make a random SPD matrix: import numpy as np def rand_spd(n): A = np.random.rand(n,n) return np.dot(A, A.T) For each test case, print • the relative error IILLT -A||2/||A||2, where L is your computed Cholesky factor. • the condition number of the matrix, as found by numpy.linalg.cond. Note that there is no need for pivoting. 5. Compute the determinant of three random SPD matrices (of sizes 5, 10 and 100, com- puted as above) using their Cholesky factors and compare the results with the deter- minant obtained using the numpy.linalg.det() function. For each example, print the following: • the size of the matrix n, • the value from numpy.linalg.det(), • your computed determinant, • and the relative error between the two,assuming result from numpy.linalg.det() to be the true value. Hints: • det(AB) = det(A) det(B), . • the determinant of a triangular matrix is the product of its diagonal entries. . 1. Suppose that a matrix A has a factorization of the form A = BBT, with B nonsingular. Show that A must be a) symmetric, and b) positive definite, that is, xAx> 0 for x/= 0. Matrices with both these properties are called symmetric positive definite (SPD) matrices, and they are an important class of matrices. In this question, you shall develop a special form of LU factorization for them. 3. Generalizing the previous part, find an algorithm that computes the Cholesky factor L for a given symmetric, positive-definite matrix A of size nxn. Hints: a) Start with 111 and proceed through rows. b) Finish computing each row of L before moving on to the next one. c) Only one half of the matrix (lower half) A needs to be accessed. 4. Implement the algorithm devised in previous part, and run it on three random SPD matrices of size 20 x 20. Here is some Python code to make a random SPD matrix: import numpy as np def rand_spd(n): A = np.random.rand(n,n) return np.dot(A, A.T) For each test case, print • the relative error IILLT -A||2/||A||2, where L is your computed Cholesky factor. • the condition number of the matrix, as found by numpy.linalg.cond. Note that there is no need for pivoting. 5. Compute the determinant of three random SPD matrices (of sizes 5, 10 and 100, com- puted as above) using their Cholesky factors and compare the results with the deter- minant obtained using the numpy.linalg.det() function. For each example, print the following: • the size of the matrix n, • the value from numpy.linalg.det(), • your computed determinant, • and the relative error between the two,assuming result from numpy.linalg.det() to be the true value. Hints: • det(AB) = det(A) det(B), . • the determinant of a triangular matrix is the product of its diagonal entries. .
Expert Answer:
Answer rating: 100% (QA)
output import numpy as np Function to compute Cholesky decomposition def choleskydecompositionA n As... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Recently,youaretaskedbyyourmanagertoevaluatetheinvestmentpotentialof2stocks,StockAand Stock B.Thecost ofequityis 8%forboth StockAand Stock B....
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Peppers Lockdown produces keys for homes and cars. As Peppers is planning for next year's production, he decided to implement a high-low system to forecast future costs. With total production of...
-
Draw as many resonance structures as you can for the followingspecies: (b) :NH2 H2N-C=NH2 (c) (a) :0: H --- () HC $H2 (e) H %H
-
Let S and T be linear transformations V W, where dim V = n and dim W = m. Show that im S = im T if and only if T = SR for some isomorphism R : V V. [Show that dim(ker S) = dim(ker T) and choose...
-
Suppose that we can use wire of \(1.0-\mathrm{mm}\) diameter to make either a single loop of wire or a solenoid, and we wish to compare, for a given current, the magnetic fields at the center of...
-
On January 1, 2011, Encino Company issued bonds with a face value of $1,000,000 and a maturity date of December 31, 2020. The bonds have a stated interest rate of 8%, payable on January 1 and July 1....
-
All work must be shown on every facet of the solution. This includes a timeline with cashflows, timing and rates clearly laid out and formulas (in pure form, not in the calculator or excel form). A...
-
The June 21, 2023, UNCTAD report referenced in the above Discussion Question overview, refers to an " ongoing decline in trade interdependence between the United States and China " along with the...
-
Consider two alternative programs for contraction. One is the removal of an investment subsidy; the other is a rise in income tax rates. Use the IS-LM model and the investment schedule, as shown in...
-
True or False? A heap can be a full binary tree.
-
A priority queue of strings is implemented using a heap. The heap contains the following elements: 1. What feature of these strings is used to determine their priority in the priority queue? 2. Show...
-
Use the Three-Question Method to verify MergeSort.
-
Draw the binary search tree whose elements are inserted in the following order: 17 11 22 5 13 19 20 Is the resulting tree an AVL tree? Explain why or why not.
-
Add a TreeType member function Ancestors that prints the ancestors of a given node whose info member contains value. Do not print value. 1. Write the declaration. 2. Write the iterative...
-
Identify the type of reaction for each of the reaction observed in the lab (i.e. is the reaction a combination, a decomposition, a single displacement, a double displacement, acid/base neutralization...
-
Before the latest financial crisis and recession, when was the largest recession of the past 50 years, and what was the cumulative loss in output over the course of the slowdown?
-
Frank Willingham has the following transactions during the year: Sale of office equipment on March 15 that cost $20,000 when purchased on July 1, 2010. Frank has claimed $5,000 in depreciation and...
-
Patty Bayan is a single taxpayer living at 543 Space Drive, Houston, TX 77099. Her Social Security number is 466-33-1234. For 2012, Patty has no dependents, and her W-2 from her job at a local...
-
Teresa is a civil engineer who uses her automobile for business. Teresa drove her automobile a total of 21,732 miles during 2012, of which 95 percent was business mileage. The actual cost of...
-
Differentiate between an open transaction and a closed transaction.
-
Differentiate between tax compliance and tax planning.
-
What form(s) is (are) used to file an individuals income tax return?
Study smarter with the SolutionInn App