# A Simple Class Assignment Exemplifies Computational Linear Algebra

The John von Neumann Lecture is among SIAM’s oldest and most prestigious prizes, recognizing “outstanding and distinguished contributions to the field of applied mathematics.” In that sense, the lecture is similar to a mathematical version of highlights from the Winter Olympics — a collage of victorious moments over mathematical challenges as varied as slalom runs, half-pipes, ski jumps, and ice rinks.

Charles Van Loan’s prize lecture at the 2018 SIAM Annual Meeting, which took place this July in Portland, Ore., had an entirely different feel. The Cornell University professor’s audience was treated to a view from Van Loan’s helmet camera as he navigated down an expert slope, beginning with a deceptively simple problem statement and culminating in a rich set of discoveries and conjectures about untangling random polygons. In that single run, he exhibited the insights, skills, and accomplishments that comprise the recognition in his prize citation: “pioneering contributions to research in numerical linear algebra and to the exposition of the subject…a brilliant communicator…(whose) book *Matrix Computations*…has shaped and influenced the way we think about matrix computations."

**Figure 1.**The simple averaging process that delivers a rewarding run through key ideas of computational linear algebra; the red polygon’s vertices are the average of the black polygon’s vertices. The centroid is invariant.

*Display a sequence of polygons where each polygon is obtained from its predecessor by connecting the midpoints of its sides. Let the original polygon be random*. Figure 1 illustrates the averaging process for five vertices and reveals that every polygon shares the same centroid.

After seeing these polygons shrink around their common centroid, Van Loan added an additional requirement: that the new arrays of averaged \(x\) and \(y\) coordinates be renormalized to unit length: \(\textrm{x=x/norm(x)}\), \(\textrm{y=y/norm(y)}\). He also fixed the centroid at the origin: \(\textrm{x=x-mean(x)}\), \(\textrm{y=y-mean(y)}\).

The normalized version of the problem produces a limiting polygon inscribed in an ellipse tilted at a 45-degree angle (see Figure 2). The vertices appear to crawl around the ellipse as the iteration proceeds. Van Loan asked his students to provide explanations of these observations, and posed questions drawn from a computational mathematician’s repertoire of reflexive queries: How long does it take the iterations to converge? Will they always converge? What is the inverse of this process?

**Figure 2.**After 27 iterations of averaging and renormalization, the 10 vertices of an initial random polygon lie close to an ellipse that is tipped 45 degrees from the coordinate axes.

*SIAM Review*article [1]. This entire adventure in computational linear algebra came full circle as the subject of this year’s John von Neumann Lecture.

When speaking to his SIAM audience, Van Loan sought to “explain it all using matrix computations.” The problem he posed to his first-year students in 2008 was part of a strategy to help beginning computer scientists “see \(n\) things as one” and get them “thinking at the vector level before they headed over to the math department,” he said. Van Loan aimed to stimulate a hunger for mathematics in his students that could explain their observations, opening the door to one of the core experiences of applied mathematics. At a basic computational level, he led them to recognize matrix-vector operations lurking implicitly within algorithms.

**Figure 3.**The matrix-vector formulation of the

*x*-vertex coordinate array’s update in the averaging process for a polygon with five vertices.

An analysis of the eigenvalues and eigenvectors of \(M_n\) now lay ahead; the linear algebra was picking up speed. Van Loan noted that one can write the update matrix as \(M_n=(I_n+S_n)/2\), where \(S_n\) is the upshift matrix, i.e., the identity matrix with its last column shifted to the first position and all other columns displaced one spot to the right. Its eigenvalues and eigenvectors are completely known. With the exception of the details—a Schur decomposition—needed to actually cross the finish line, this race was over.

As an example, Figure 4 shows the structure of the Schur decomposition of \(M_5\). To follow the effects of powers of the update matrix on an array of \(x\) or \(y\) coordinates of an initial polygon, one can expand those arrays in terms of a real Schur basis, as in Figure 5.

**Figure 4.**The structure of the Schur decomposition of

*M*

_{5},

*Q*

^{T}M_{5}

*Q*=

*T*, showing the three invariant subspaces of

*M*

_{5}.

If each iteration renormalizes the vertex coordinate arrays to unit vectors, only the red component survives because the complex conjugate pair of red eigenvalues has larger magnitude. At that point, we might as well have started with coordinate arrays that are norm-one linear combinations of the red vectors in Figure 5’s Schur basis expansion. With just a touch more analysis via a singular-value decomposition, the limiting ellipse emerges — tilted 45 degrees from the coordinate axes.

There is still more before the finish. The vertices appear to move around the limiting ellipse because they alternate between even and odd steps. Iterating in reverse yields starburst polygons instead of the smoother, ellipsoidal polygons of forward iteration; the invariant subspace associated with the complex eigenvalues of smallest magnitude dominates, and the components of its basis vectors tend to flip-flop in sign. Computational evidence also points to a conjectural version of Kepler’s second law: the centered “pizza slice” triangles lying on the limiting ellipse have equal area.

**Figure 5.**One can expand the

*x*- and

*y*-vertex vectors in a real, orthonormal Schur basis, as shown here for the

*x*-vector.

*Van Loan’s lecture is available from SIAM either as slides with synchronized audio or a PDF of slides only.*

*Since 1960, SIAM has annually recognized a John von Neumann lecturer “for outstanding and distinguished contributions to the field of applied mathematics, and for the effective communication of these ideas to the community.” The award honors John von Neumann (1903-1957), one of the most prolific and articulate practitioners of applied mathematics in the 20th century. It includes an honorarium of $5,000 from a fund established by IBM and maintained by SIAM.*

*The figures in this article were provided by Charles Van Loan.*

**References**

[1] Elmachtoub, A.N., & Van Loan, C.F. (2010). From Random Polygon to Ellipse: An Eigenanalysis. *SIAM Rev., 52*(1), 151-170.