Singular Matrices The following code generates 100 2 times 2

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 + l)*rand(2) - k)) 0 percent(k) = percent(k) + 1; end end end percent a. What do the values of the answer percent tell you about the percent of matrices that are singular as k increases? b. Repeat the experiment for 3 times 3 matrices. What can you say about the percent of singular matrices in this case? c. What does this indicate about the percent of singular matrices as the size of the matrix increases?

Solution

a) Percent values with k:

43    26    13     9    10     1     7     2     2     2     3     1     0     1     3     0     0     0     0     2

As k increases, the percentage of matrices that are singular decreases exponentially. This can be verified by plotting a log of percent with k.

b) For 3X3 matrices, percent values:

19     2     5     1     1     0     1     0     0     0     0     0     0     0     0     0     0     0     0     0


This also decreases exponentially with k and even with a higher rate than 2X2 matrices.

c)Hence, the percent of singular matrices decreases as the size of the matrix increases.

Just to verify this, I also ran this for a 4X4 matrix and got the following output.

3     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0


So, it went to zero immediately.

 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

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site