Introduction
This course builds on the matrix section of the Fundamental Mathematical Tools and Linear Algebra and Coding courses that you encountered in semesters 1 and 3. It will delve deeper with a theoretical perspective that will help you truly understand linearity beyond the simple functions of a single variable that you studied in secondary education.
This course will also introduce fundamental concepts such as basis, change of basis, and associated matrices that we will use in the subsequent 3D Visualization course.
0.1 Examples of Applications of Linear Algebra
Many problems reduce to solving a system of linear equations. Some puzzles are in the following form.
Puzzle
Rabbits and chickens coexist in a yard. There are 128 heads and 438 legs.
How many chickens are there?
Without a method, it’s easy to get lost. With a method, we denote \(x\) as the number of rabbits and \(y\) as the number of chickens, leading to the following system (with chickens having 2 legs and rabbits 4 legs):
\[\left\{\begin{matrix}x+y&=128\\4x+2y&=438\end{matrix}\right.\]
By solving the system, we find \(x=91\) and \(y=37\). Thus, the answer is 37 chickens.
Calculating Course Grades
Outside of puzzles, there are problems where linear algebra and/or the use of matrices offer practical and programmable solutions.
Here is the table with the coefficients of subjects per course unit (UE).

Figure 0.1: The coefficient table per UE
Given the grades obtained in each subject, how do we find the grades per UE? Simply multiply the coefficient matrix by the column vector of grades!
Lights Out
We will also spend time playing Lights Out!, an electronic game from the 1990s (which can still be played online (https://daattali.com/shiny/lightsout/)) where the goal is to turn off all the lights by pressing on them (which also changes the state of neighboring lights). Although the game might seem simplistic, solving it is not easy at all!

Figure 0.2: The original Lights Out game
We will see that winning the game involves solving a linear system. We will then address the following questions:
- Can you always win from any initial configuration?
- If there is a solution, is it unique?
- If there are multiple solutions, how can you find the one with the minimal number of moves?
During a Python lab, we will program the game using matrices. This will include both programming the game and a solver.
Perspectives and Changing the Point of View
3D video games actually display 2D images (even 3D headsets display two 2D images). How do you calculate a 2D view from a 3D scene? How do you change the point of view?
To address these issues, coordinate transformations and \(3\times 3\) or \(4\times 4\) matrix multiplications are used.
A similar practical problem is as follows: A scanning app straightens a document that appears as an arbitrary quadrilateral in the photo into a nice A4 rectangle. How does it do that? What geometric transformation is behind this straightening? We will see in the 3D Visualization course that this question is answered again through matrix multiplication.

Figure 0.3: Mobile phone scanning app
An Image is a Matrix
We will explore how images are represented by matrices for computers. A black-and-white image with \(n\times m\) pixels will be encoded by a matrix of size \(n\times m\) where each matrix coefficient represents a gray level. If the image is in color, a matrix is needed for each primary color (Red, Green, and Blue).
Once images are represented by matrices, linear algebra can be applied to them, for instance, by summing two images.

Figure 0.4: Sum of two images. Source: (https://hadrien-montanelli.github.io/2022-12-30.html)
Many other transformations on images (and also audio and video files) use linear algebra: filters, convolution, blurring, face swapping, morphing…

Figure 0.5: Morphing from Bush to Obama. Source: (https://studentstudyhub.com/morphing-metamorphosis-techniques-applications/)
0.2 Methodology
Although this is a third-year course, it is not useless to recall the methodology for succeeding in mathematics courses. The fundamental principles are as follows:
- Perfect attendance in lectures and tutorials,
- Review the course material before attending tutorials (re-read the last chapter, learn definitions, know the statements of proven results),
- Be active in tutorials,
- Rework tutorial exercises before exams and practice additional exercises.
0.3 Greek Alphabet
Often, to distinguish between numbers and vectors, we use some letters from the Greek alphabet for the former and the Latin alphabet for the latter. Here are the main lowercase Greek letters used in mathematics.
Greek Letter | Name |
---|---|
\(\alpha\) | alpha |
\(\beta\) | beta |
\(\gamma\) | gamma |
\(\delta\) | delta |
\(\epsilon\) | epsilon |
\(\theta\) | theta |
\(\lambda\) | lambda |
\(\mu\) | mu |
\(\pi\) | pi |
\(\rho\) | rho |
\(\sigma\) | sigma |
\(\tau\) | tau |
\(\phi\) | phi |
\(\psi\) | psi |
\(\omega\) | omega |