Question: Use MATLAB to construct a matrix A by setting A = vander(1 : 6); A = A - diag(sum(A)) (a) By construction, the entries in
A = vander(1 : 6); A = A - diag(sum(A′))
(a) By construction, the entries in each row of A should all add up to zero. To check this, set x = ones(6, l) and use MATLAB to compute the product Ax. The matrix A should be singular. Why? Explain. Use the MATLAB functions det and inv to compute the values of det(A) and A-1. Which MATLAB function is a more reliable indicator of singularity?
(b) To see what is going wrong, it helps to know how MATLAB computes determinants. The MATLAB routine for determinants first computes a form of the LU factorization of the matrix. The determinant of the matrix L is ±1 depending on the whether an even or odd number of row interchanges were used in the computation. The computed value of the determinant of A is the product of the diagonal entries of U multiplied by det(L) = ±1. In the special case that the original matrix has integer entries, the exact determinant should take on an integer value. So in this case MATLAB will round its decimal answer to the nearest integer. To see what is happening for our original matrix, use the following commands to compute and display the factor U.
format short e
[L, U] = lu(A); U
In exact arithmetic U should be singular. Is the computed matrix U singular? If not, what goes wrong? Use the following commands to see the rest of the computation of d = det(A).
format short
d = prod(diag(U))
d = round(d)
Step by Step Solution
3.48 Rating (168 Votes )
There are 3 Steps involved in it
a Since Ax 0 and x 0 the matrix must be singular However there may be no indication of thi... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (1 attachment)
949-M-L-A-E (534).docx
120 KBs Word File
