|
|
|
|
|
by jwmerrill
1914 days ago
|
|
I don’t think they’re actually intending to refer to physics here—they could have said “as fast as theoretically possible” instead. A square matrix with n rows and columns has n^2 entries, so if you need to look at all the entries in two matrices to compute their product, then you need to do O(n^2) work just to look at all the relevant entries. The only way you could get around this is if you know many entries are 0, or identical, or have some other structure such that you don’t need to look at them separately. |
|
Every matrix multiplication can be boiled down to multiplying rows by columns. This is definitionally required for matrix multiplication, so that is the lower bound for how many multiplications are required. One multiplication for every final element in the n x n matrix, or n^2.