# (Rank-Deficient Matrices) In this exercise we consider how to use MATLAB to generate

**Chapter 3, Problem 2**

(choose chapter or problem)

(Rank-Deficient Matrices) In this exercise we consider how to use MATLAB to generate matrices with specified ranks. (a) In general, if A is an m n matrix with rank r, then r min(m, n). Why? Explain. If the entries of A are random numbers, we would expect that r = min(m, n). Why? Explain. Check this out by generating random 6 6, 8 6, and 5 8 matrices and using the MATLAB command rank to compute their ranks. Whenever the rank of an mn matrix equals min(m, n), we say that the matrix has full rank. Otherwise, we say that the matrix is rank deficient. (b) MATLABs rand and round commands can be used to generate random m n matrices with integer entries in a given range [a, b]. This can be done with a command of the form A = round((b a) rand(m, n)) + a For example, the command A = round(4 rand(6, 8)) + 3 will generate a 6 8 matrix whose entries are random integers in the range from 3 to 7. Using the range [1, 10], create random integer 10 7, 8 12, and 10 15 matrices and in each case check the rank of the matrix. Do these integer matrices all have full rank? (c) Suppose that we want to use MATLAB to generate matrices with less than full rank. It is easy to generate matrices of rank 1. If x and y are nonzero vectors in Rm and Rn, respectively, then A = xyT will be an m n matrix with rank 1. Why? Explain. Verify this in MATLAB by setting x = round(9 rand(8, 1)) + 1, y = round(9 rand(6, 1)) + 1 and using these vectors to construct an 86 matrix A. Check the rank of A with the MATLAB command rank. (d) In general, rank(AB) min(rank(A), rank(B)) (1) (See Exercise 28 in Section 3.6.) If A and B are noninteger random matrices, the relation (1) should be an equality. Generate an 8 6 matrix A by setting X = rand(8, 2), Y = rand(6, 2), A = X Y What would you expect the rank of A to be? Explain. Test the rank of A with MATLAB. (e) Use MATLAB to generate matrices A, B, and C such that (i) A is 8 8 with rank 3. (ii) B is 6 9 with rank 4. (iii) C is 10 7 with rank 5.

**Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber. **

**Becoming a subscriberOr look for another answer **