Back to Speed of Calculating Determinants

Exercise 1

Avg difficulty 3.0

To get an idea of what happens for typical matrices we can use the ability of computer systems to generate random numbers (of course, these are only pseudo-random in that they come from an algorithm but they pass a number of reasonable statistical tests for randomness).

  • Fill a 5 ⁣× ⁣55\!\times\!5 array with random numbers say, in the range [ 0…1 )[\,0\ldots 1\,)). See if it is singular. Repeat that experiment a few times. Are singular matrices frequent or rare in this sense?

  • Time your computer algebra system at finding the determinant of ten 10 ⁣× ⁣1010\!\times\!10 arrays of random numbers. Find the average time per array. Repeat the prior item for 20 ⁣× ⁣2020\!\times\!20 arrays, 30 ⁣× ⁣3030\!\times\!30 arrays, …100 ⁣× ⁣100100\!\times\!100 arrays, and compare to the numbers given above. (Notice that, when an array is singular, we can sometimes decide that quickly, for instance if the first row equals the second. In the light of your answer to the first part, do you expect that singular systems play a large role in your average?)

  • Graph the input size versus the average time.

Hefferon, Linear Algebra, Determinants, Speed of Calculating Determinants, Exercise 1

AI Tutor

Adapted from Linear Algebra © 2016 Jim Hefferon. Licensed under CC BY-SA 3.0 US. Source: Linear Algebra. Imported at revision df2262e.