Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Singular Matrices The following code generates 100 2 times 2 matrices with integ

ID: 3031866 • Letter: S

Question

Singular Matrices The following code generates 100 2 times 2 matrices with integer coefficients in the ranges k = 1, 2, ..., 20. For each fixed k, it finds the percent that are singular. percent = zeros (1, 20) ' ; for k = 1 : 20 for i = 1 : 100 if det(floor((2*k + 1)*rand(2) - k)) ==0 percent (k) = percent (k) + 1; end end end percent What do the values of the answer percent tell you about the percent of matrices that are singular as k increases? Repeat the experiment for 3 times 3 matrices. What can you say about the percent of singular matrices in this case? What does this indicate about the percent of singular matrices as the size of the matrix increases?

Explanation / Answer

(a)

Columns 1 through 16:   

   42   25   11    7    3    7    3    4    1    2    4    1    3    0    0    1 Columns 17 through 20: 0    1    0    1

As k increases, percent singular matrices decreases.

(b)

Columns 1 through 16:   

   46   18   12    1    4    1    0    2    0    0    0    1    0    0    0    0 Columns 17 through 20:

    0    0    0    0   

As k increases, percent singular matrices decreases.

(c)

With increasing size, percent is usually less for larger size matrix