Linear Algebra refresher
Star

By Afshine Amidi and Shervine Amidi

Matrix notations

Vector We note $x\in\mathbb{R}^n$ a vector with $n$ entries, where $x_i\in\mathbb{R}$ is the $i^{th}$ entry:

\[\boxed{x=\left(\begin{array}{c}x_1\\x_2\\\vdots\\x_n\end{array}\right)\in\mathbb{R}^n}\]

Matrix We note $A\in\mathbb{R}^{m\times n}$ a matrix with $n$ rows and $m$, where $a_{i,j}\in\mathbb{R}$ is the entry located in the $i^{th}$ row and $j^{th}$ column:

\[\boxed{A=\left(\begin{array}{ccc}a_{1,1}& \cdots&a_{1,n}\\\vdots&& \vdots\\a_{m,1}& \cdots&a_{m,n}\end{array}\right)\in\mathbb{R}^{m\times n}}\]

Remark: the vector $x$ defined above can be viewed as a $n\times1$ matrix and is more particularly called a column-vector.


Matrix-vector multiplication The product of matrix $A\in\mathbb{R}^{m\times n}$ and vector $x\in\mathbb{R}^{n}$ is a vector of size $\mathbb{R}^{n}$, such that:

\[\boxed{Ax=\left(\begin{array}{c}\displaystyle\sum_{j=1}^na_{1,j}x_j\\\vdots\\\displaystyle\sum_{j=1}^na_{m,j}x_j\end{array}\right)\in\mathbb{R}^{m}}\]

System of equations The system of equations

\begin{align*} \begin{cases} y_1& =a_{1,1}x_1+a_{1,2}x_2+...+a_{1,n}x_n\\ y_2& =a_{2,1}x_1+a_{2,2}x_2+...+a_{2,n}x_n\\ \vdots& \\ y_m& =a_{m,1}x_1+a_{m,2}x_2+...+a_{m,n}x_n\\ \end{cases} \end{align*}

can be rewritten in matrix form $\boxed{y=Ax}$ with $y\in\mathbb{R}^m, A\in\mathbb{R}^{m\times n}$ and $x\in\mathbb{R}^n$.



Determinant

Definition The determinant of a square matrix $A\in\mathbb{R}^{n\times n}$, noted $|A|$ or $\textrm{det}(A)$ is expressed recursively in terms of $A_{\backslash i, \backslash j}$, which is the matrix $A$ without its $i^{th}$ row and $j^{th}$ column, as follows:

\[\boxed{\textrm{det}(A)=|A|=\sum_{j=1}^n(-1)^{i+j}a_{i,j}|A_{\backslash i,\backslash j}|}\]

Remark: $A$ is invertible if and only if $|A|\neq0$. Also, $|AB|=|A||B|$ and $|A^T|=|A|$.


Characteristic equation The characteristic equation of a linear system of $n$ equations represented by $A$ is given by:

\[\boxed{\textrm{det}(A-\lambda I)=0}\]

For $n=2$, this equation can be written as:

\[\boxed{\lambda^2-(a_{11}+a_{22})\lambda+(a_{11}a_{22}-a_{12}a_{21})=0}\]

Eigenvector, eigenvalue The roots $\lambda$ of the characteristic equation are the eigenvalues of $A$. The solutions $\vec{v}$ of the equation $A\vec{v}=\lambda I$ are called the eigenvectors associated with the eigenvalue $\lambda$.


Computing the determinant in particular cases

For a $2\times2$ matrix The determinant of a given matrix $A\in\mathbb{R}^{2\times2}=\left(\begin{array}{cc}a&b\\c&d\end{array}\right)$ can be computed as follows:

\[\boxed{\textrm{det}(A)=ad-bc}\]

For a $3\times3$ matrix The determinant of a given matrix $A\in\mathbb{R}^{3\times3}=\left(\begin{array}{ccc}a&b&c\\d&e&f\\g&h&i\end{array}\right)$ can be computed as follows:

\[\boxed{\textrm{det}(A)=a(ei-fh)-b(di-fg)+c(dh-eg)}\]


Partial fractions

Concept A fraction $\frac{P(x)}{Q(x)}$ with $P$ and $Q$ polynomial functions of $x$ and $\textrm{deg}(P)<\textrm{deg}(Q)$ can be decomposed into partial fractions by distinguishing the types of roots that are in the factorized form of $Q(x)$, as detailed in the table below:


Factor of $Q(x)$ Type of root Associated partial fraction
$(x-a)^n$ Real root of multiplicity $n\geqslant1$ $\displaystyle\frac{A_1}{x-a}+...+\frac{A_n}{(x-a)^n}$
$(ax^2+bx+c)^n$ Complex roots of multiplicity $n\geqslant1$ $\displaystyle\frac{A_1x+B_1}{ax^2+bx+c}+...+\frac{A_nx+B_n}{(ax^2+bx+c)^n}$