Notebook 9 – Math 2121, Fall 2020

There is a bounded region of space in Rn that we naturally associate to an n×n matrix: namely, consider the n-dimensional parallelogram (called a parallelepiped when n=3) whose edges are the columns of your matrix. Define the volume of a matrix to be the volume of this region.

2.7 ms
1.1 μs

Our goal today is to uncover a formula for this volume. But first we need to better understand what the n-dimensional parallelogram associated to an n×n matrix looks like and what "volume" means for a region in Rn.

15.4 μs
974 ns

A 1×1 matrix is just a scalar.

However our definitions work, they should associate a volume of |a| to A=[a] when n=1.

13.5 μs
751 ns

The n=2 case is more informative.

In 2 dimensions, we usually refer to volume as area.

Consider the following 2×2 matrix:

16.5 μs
A
2×2 Array{Float64,2}:
 3.76  -0.68
 0.54   1.37
22.7 μs

Here is a picture of the parallelogram spanned by the columns of M:

12.5 μs
326 ms

How can we characterize this parallelogram?

Well, every point inside the parallelogram has the form Av for some vector

v=[v1v2]R2

with 0v11 and 0v21. This suggests a general definition:

The n-dimensional parallelogram of an n×n matrix A is the set of all points

{Av:v=[v1v2vn]Rn with 0vi1 for i=1,2,,n}.

Then we define the volume of an n×n matrix to be the volume of this region.

26.5 μs
941 ns

Next issue: how is volume defined in Rn?

The definition should obey our intuition that the volume of a rectangular region is

length×width×height×

and volume should be invariant under translation.

That is, if L1,L2,,Ln are positive numbers then the region

rect(L1,L2,,Ln)={vRn:0viLi for i=1,2,,n}

should have volume L1L2Ln. Moreover, any translate of this region

u+rect(L1,L2,,Ln)={u+vRn:0viLi for i=1,2,,n}

where uRn is some given element should have the same volume.

Finally, if we have two regions in Rn that don't overlap, then the volume of their union should be the sum of their individual volumes.

21.5 μs
1 μs

Here is one definition of the volume of a region S in Rn that satisfies these properties: choose small positive numbers L1,L2,,Ln>0 and fill up as much of S as possible with nonoverlapping translates of the n-dimensional rectangle rect(L1,L2,,Ln). If you can fit N such regions completely inside S without any overlap, then you say your estimated volume is

NL1L2Ln.

The true volume of S is then the limit superior of all possible estimated volumes.

To define limit superior, we need calculus; you can think of this as just the maximum.

23.8 μs
1.3 μs

This conforms with our usual definiton of area in two dimensions.

But in R2 we can also calculate area more directly:

14.3 μs
48.2 ms
12.9 μs
5.518399999999999
15.3 μs
790 ns

Here is an alternate, probabilistic definition of volume that is more amenable to estimation.

Consider a region S in Rn. Define the volume of

R=u+rect(L1,L2,,Ln)={u+vRn:0viLi for i=1,2,,n}

to be L1L2Ln as usual. Choose u and L1,L2,,Ln such that

SR.

Now sample many points uniformly at random from the region R. The volume of S should then be (close to) the volume of R times the fraction of these points that are contained in S.

With enough random points, this approximate volume will converge to the true volume.

21.3 μs
1.4 μs

When our matrix A is invertible and S is the n-dimensional parallelogram associated to A, then there is an easy way for us to test whether a random point wR belongs to S:

We just check if A1w has all coordinates between 0.0 and 1.0.

Thus, we can try to implement the probabilistic definition to estimate the matrix volume.

13 μs
volume_estimates (generic function with 1 method)
129 μs
estimate_bounds (generic function with 2 methods)
90.7 μs
trials
5000
3.2 μs
matrix
2×2 Array{Float64,2}:
 3.76  -0.68
 0.54   1.37
1.2 μs
427 μs
884 ns

The following graph shows what happens when we sample a large number N of points from a rectangular region R containing the n-dimensional parallelogram S of our matrix A, and then multiply the faction of the points that are in S by the volume of R.

The resulting plots should estimate the volume of our matrix.

16.1 μs
5.9 ms51.6 ms
5.606547839999998
6.4 μs
5.5184
10.8 μs

The punchline in this last graph: the volume of our matrix is the absolute value of the determinate.

Thus the physical interpretation of det(A) is as the signed volume of A.

This works in any dimension, not just n=2.

19.9 μs
M
4×4 Array{Float64,2}:
 -3.399  -3.273  -3.141  -1.812
 -4.421  -4.434  -4.815  -2.708
  4.941   4.193  -3.494  -1.508
  0.11    0.338   0.775   4.577
14.8 μs
918 μs
htrials
10000000
1.5 μs
5.9 s
-14.494864906292989
15.5 μs
14.869115720278915
5.5 μs

Next time: what is the physical interpretation of the sign of det(A)?

23 μs