One of the most fundamental objects in linear algebra (in fact, in all applied mathematics) is a matrix, and the most basic core problem is solving systems of linear equations. So, we start with a brief review of matrices and methods for solving systems of linear equations.
Definition
A matrix is a rectangular array of numbers:
Here, is the number of rows in and is the number of columns. The matrix is square if .
Matrix Arithmetic
Matrix Addition:
,
It has usual properties:
(Commutative)
(Associative)
Scalar Multiplication:
Matrix Multiplication:
All usual properties are there such as associativity and distributivity except.
Linear Equations
The above defined matrix multiplication immediately allows to rewrite a general linear system of equations with unknowns:
in a compact matrix form: where , .
Curve Fitting:
Suppose we have a set of data points: where are measurements in a certain experiment. Suppose we want to fit a polynomial to the data, e.g. find a polynomial that passes through these points. Given points, it is enough to consider polynomials of degree . Let , where . So the problem is to find the coefficients such that:
The more data points we have, the larger the system.
Very few differential equations can be solved analytically (intuitive reason: very few functions are analytically integrable). In most applications, numerical solutions are required. Consider the following equation (Poisson eq.):
Temperature distribution () in a bar with a heat source
Deformation of an elastic bar
Deformation of a string under tension
In applications, the "source term" may not be even known in a closed form. We may just be able to measure at any point . To solve this problem we need to discretize it.
Let us subdivide interval into equal subintervals: ,
Let . From the boundary condition, we know that , . If we find this will give us an approximation of . The first step is to approximate . Assuming that is small ( is large) which can be obtained as the average of two more direct approximations: and :
Therefore, leads to the difference equation: where , .
This system of difference equations can be written in the matrix form:
You can't use 'macro parameter character #' in math mode\begin{bmatrix} 2 & -1 & 0 & \cdots & 0 \\ -1 & 2 & -1 \\ 0 & -1 & 2 & \ddots & 0\\ \vdots & & \ddots & \ddots & -1 \\ 0 & \cdots & 0 & -1 & 2 \end{bmatrix}\begin{bmatrix}u_1 \\\vdots\\ u_n\end{bmatrix}=h^2\begin{bmatrix}f_1\\\vdots\\ f_n\end{bmatrix}$$ To obtain an accurate approximation, the discretization step $h$ should be small $\Rightarrow n$ should be large. Numerical schemes for PDEs arising in fluid and solid mechanics, weather prediction, image and video processing, molecular dynamics, chemical processes, etc., often require $n\sim10^6$ and more. The design of efficient numerical algorithms for solving large systems is an active area of research. ## Square Matrices ### Inverses: The inverse of a matrix is an analog of the reciprocal of a number. > [!Definition] > Let $A\in M_{n\times n}$. The inverse of $A$, denoted $A^{-1}$, is an $n\times n$ matrix that satisfies: $AA^{-1}=A^{-1}A=I_n$ where $I_n=\begin{bmatrix}1 & & 0 \\ & \ddots \\ 0 & & 1\end{bmatrix}$ is the $n \times n$ identity matrix. Let us recall a few important properties of matrix inverses. > [!info]- > If $A\in\mathbb{M}_{m\times n}$ we can define a right inverse of $A$ as a matrix $X\in\mathbb{M}_{n\times m}$ such that $AX=I_m$; or left inverse of $A$ as a matrix $Y\in\mathbb{M}_{n\times m}$ such that $YA=I_n$. 1) If $A^{-1}$ exists, then it is unique. Proof: Suppose $AX=XA=I$ and $AY=YA=I$. Then $X=XI=X(AY)=(XA)Y=Y$. 2) $(A^{-1})^{-1}=A$ Proof: All we need to check is that the definition is satisfied: $A^{-1}\cdot A=I_n$, similarly $A\cdot A^{-1}=I_n$. 3) If $A,B\in\mathbb{M}_{n\times n}$ are invertible $\Rightarrow (AB)^{-1}=B^{-1}A^{-1}$ Proof: Simple check. $(AB)\cdot(B^{-1}A^{-1})=A(BB^{-1})A^{-1}=AA^{-1}=I$ $(B^{-1}A^{-1})\cdot(AB)=B^{-1}(A^{-1}A)B=B^{-1}B=I$ From the theory of matrices, it follows that asking $AA^{-1}=I$ or $A^{-1}A=I$ in the definition is enough. 4) If $AX=I_n$, then $XA=I_n$ and thus $X=A^{-1}$. If $XA=I_n$, then $AX=I_n$ and thus $X=A^{-1}$. Proof: Not all square matrices have the inverse (but most!). See below. ### Singularity: > [!Definition] > A noninvertible matrix $A$ is called singular. If $A^{-1}$ exists $\Rightarrow A$ is nonsingular. The original motivation for introducing the matrix inverse is that it allows to write the solution of any linear system in a compact way: If $A$ is nonsingular, then the unique solution of $Ax=b$ is $x=A^{-1}b$. However, finding the inverse $A^{-1}$ (using e.g. the Gauss-Jordan method) is computationally inefficient as compared to direct Gaussian Elimination, which provides a systematic method for solving linear systems. Nevertheless, $A^{-1}$ is of great theoretical importance and provides insights into the design of practical algorithms.