Construct a random 4 by 4 matrix A whose entries are integer
Construct a random 4 by 4 matrix A, whose entries are integers between 0 and 10. Find a QR factorization of the matrix A. By Ex. 23 (p. 282), the matrix A is similar to the matrix RQ. By Theorem 4 (p. 279), similar matrices have the same eigenvalues. You will verify this fact in the next step. Find the eigenvalues of A and the eigenvalues of RQ, and compare. Identify the dominant eigenvalue of A. Apply the power method of Sec. 5.8, to obtain an estimate of this dominant eigenvalue of A. You will also find a corresponding eigenvector in the process. Choose the initial vector x_0 = (1 0 0 0)^T. Use enough iteration to find the eigenvalue correct to 4 decimal places.
Solution
1) The random 4*4 matrix with integers range from 0 to 10 would be
A= randi(10,4,\'distributed\');
The first parameter to randi function gives the upper range , second parameters gives the size of array
