Post Date
Mar 1 2021

Seeing Is Believing—Or, Is It?

Written by Dr. Zahra Lakdawala, who is an Assistant Professor at the Department of Mathematics, SBASSE.

I would like to share the story of an assignment for the course of Applied/Numerical Linear Algebra that has intrigued several of my students. The purpose of this assignment was to make it more enjoyable for students the basis of any numerical algorithm for solving a linear system of equations—and simultaneously add a fun element to learning the aspects of matrix rank and dimensionality reduction. The application chosen was that of image compression.

Here is how it began: students took their own selfie images (now carefully preserved for posterity) and converted them as a matrix of coefficients using Python packages. Face features and peculiarities are defined by their face contours, intensity, and size. Some have complex ‘stark’ features, and some have ‘flat’ features. The complexity of each face is reflected in the extent to which the dimensions of the image matrix can be reduced using underlying concepts of rank reductions and compression of an image. Every artistic touch or the complexity of each face will increase the rank vis-à-vis the complexity of their face matrix. Here is a visual of what one of the students got.

I asked them to compare the features using reduced rank/dimensions and define a parametric understanding to link the two together (using a numerical method, such as singular value decomposition).

Our curiosity extended beyond the content that was covered in class. We asked ourselves: Can we see human and animal feature complexity with the same lens of numerical linear algebra? Why not? After all, numbers are numbers. And an image is a projected version of 3D space into a 2D space. The gray values give the image its depth/shape. For comparison, I used an image of my feathered friend with seemingly complex shades of gray in its furry feathered pattern. It turned out that the rank / dimensionality was also reduced by a factor 10 until which the original and compressed image looked the same to the human eye.

Homework, assignments, and assessments—the words are enough to make a student ‘yawn’ and feel as if they’re going through torture. Certainly not the case when students reconstruct their faces bit by bit until they recreate a compressed version of themselves. They now understand that what they see in the mirror is nothing but a projection of themselves and not their entire true self. Reality is truly different from how we perceive it to be, and there are many instances when we can smartly get rid of excess data.

Analyzing data as coefficient matrices of real number and the formal methods to smartly arrange and get rid of unnecessary data is what we learn in a class of applied linear algebra. Is mathematics really around us in ways we never imagined? Each time we try to understand the world and our existence, we hear a Gaussian whisper in our ears: ‘See, I told you so’.