Generate a matrix A by setting A = floor(10 * rand(6)) and generate a vector b by

Question:

Generate a matrix A by setting
A = floor(10 * rand(6))
and generate a vector b by setting
b = floor(20 * rand(6, 1)) - 10
(a) Since A was generated randomly, we would expect it to be nonsingular. The system Ax = b should have a unique solution. Find the solution using the "\" operation. Use MATLAB to compute the reduced row echelon form U of [A b]. How does the last column of U compare with the solution x? In exact arithmetic they should be the same. Why? Explain. To compare the two, compute the difference U(:, 7) - x or examine both using format long.
(b) Let us now change A so as to make it singular. Set
A(:, 3) = A(:, 1 : 2) * [4 3]′
Use MATLAB to compute rref([A b]). How many solutions will the system Ax = b have? Explain.
(c) Set
y = floor(20 * rand(6, 1)) - 10 and c = A * y
Why do we know that the system Ax = c must be consistent? Explain. Compute the reduced row echelon form U of [A c]. How many solutions does the system Ax = c have? Explain.
(d) Set v = w + 3 * z. The vector v should be a solution to the system Ax = c. Why? Explain. Verify that v is a solution by using MATLAB to compute the residual vector c - Av. What is the value of the free variable XT, for this solution? How could we determine all possible solutions to the system in terms of the vectors w and z? Explain.
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: