An example that my last class loved was lossy image compression using the singular value decomposition.

The SVD says that the transformation corresponding to any real matrix (not necessarily square) can be decomposed into three steps: a rotation that forgets some dimensions, a stretch along the coordinate axes, and finally a rotation. In other words, every matrix can be written the form HDA, with the rows of A being orthonormal, the columns of H being orthonormal, and D being a square diagonal matrix with nonnegative nonincreasing entries on the diagonal.

Consider a photograph that is an $768\times 1024$ array of $(red,green,blue)$ triples, which we can just as well store as 3 matrices $R$, $G$, and $B$ of real numbers. Now even though the matrix $R$ has nothing to do with transforming space, we can consider it as such, and using SVD write $R=HDA$. Call the numbers on the diagonal of $D$ by $\lambda_1\geq \lambda_2 \geq \cdots \geq \lambda_s\geq 0$, and let $D_k'$ be $diag(\lambda_1,\dots,\lambda_k,0,0,\dots)$, an $s\times s$ diagonal matrix, and let $D_k$ be $diag(\lambda_1,\dots,\lambda_k)$. Let $H_k$ be the $768\times k$ matrix formed from the first $k$ columns of $H$, and similarly let $A_k$ be the $k\times 1024$ matrix formed from the first $k$ rows of $A$. Then
$$R = HDA \approx HD_k' A = H_k D_k A_k,$$
where $\approx$ is because of continuity, which is appropriate if the $\lambda$'s that were replaced with zeros were small.

Now for the punch-line. We need $3\cdot 768 \cdot 1024$ (about 2 megabytes) real numbers initially to store the photograph. But to store $H_k$, $D_k$, and $A_k$ for each of the three colors, we need only $3(768\cdot k+k+k\cdot 1024)=5379 k$ real numbers. With $k=25$, that gives a compression ratio of about 18. That is, file size goes from around 2 mb to around 130 kb. That is, it is faster by a factor of 20 to transmit the three matrices $H_{25}, D_{25}, A_{25}$ than it is to transmit their product.

SVD is fast enough to compute that you can do this instantly (using Mathematica, say) with a picture of the audience, and they can marvel at their own blurry (but quite recognizable) faces. Also, showing the actual file sizes on disk of the original bitmap and the compressed image is quite impressive. At least, it is if your calculations come out extremely close.

What's really impressive about this example (to me, at least) is that the matrix that we start with is just a table of data and not a transformation. But by considering it as if it were a transform, we gain power over it anyway. This is great motivation for linear algebra; students find it much easier to imagine encountering a table of data than a linear transformation.

non-homogeneousinductive sequences. To computehomogeneousinductive sequences, it's probably more efficient to employ other methods (such as generating series (some MathOverflowers know much more than I about this)). [Byinductive sequenceI mean here a sequence $z\in\mathbb C^{\mathbb N}$ satisfying $P(S)z=a$, with $P\in\mathbb C[X]$, $P\not=0$, $S=$ shift, $a\in\mathbb C^{\mathbb N}$. And $z$ is calledhomogeneousiff $a=0$.] – Pierre-Yves Gaillard Jul 30 '10 at 15:45