Matrices and linear equations

Theorem (inverse of matrix) open_in_new

For an $n\times n$ matrix $A$, if $\det A\neq 0$, then $A\inv$ exists and is $$ (A\inv)_{ij} = \frac{\Delta_{ji}}{\det A}. $$

Proof

Calculating inverse of matrix is time-consuming.

System of linear equations with unique solution open_in_new

Suppose $A\v x = \v b$, where $A$ is an $n\times n$ matrix, and $\v x,\v b$ are $n\times 1$ column vectors.

We call the system homogenous if $\v b=\v 0$, otherwise inhomogenous.

If $\det A\neq 0$, then $A\inv$ exists, and $$\v x=A\inv\v b$$ is the unique solution.

Another perspective is that for the standard basis $\v e_i$, $\det A\neq 0$ implies that the columns i.e. images of the basis $\v e_i' = A\v e_i$ are linearly independent. Since there are $n$ such vectors, $\v e_i'$ form a basis of $\R^n$ or $\C^n$. Therefore, $$ \text{rank } r(A) = n,\quad \text{nullity } n(A) = 0. $$ This agrees with the fact that the kernel is $\set \v0$.

Gaussian elimination open_in_new

Process of Gaussian elimination open_in_new

For a system of $m$ linear equations in $n$ unknowns, $$\pmat{A_{11} & A_{12} & A_{13} & \ldots & A_{1n} \\ A_{21} & A_{22} & A_{23} & \ldots & A_{2n} \\ \vdots & & & \ddots & \vdots \\ A_{m1} & A_{m2} & A_{m3} & \ldots & A_{mn}} \pmat{x_1 \\ x_2 \\ x_3 \\ \vdots \\ x_n} = \pmat{d_1 \\ d_2 \\ \vdots \\ d_m} \qquad \qquad \begin{cases} A_{11} x_1 + A_{12} x_2 + \ldots + A_{1n} x_n &= d_1 \\ A_{21} x_1 + A_{22} x_2 + \ldots + A_{2n} x_n &= d_2 \\ \vdots \\ A_{m1} x_1 + A_{m2} x_2 + \ldots + A_{mn} x_n &= d_m \\ \end{cases}$$

By assuming $A_{11}\neq 0$ etc by reordering the equations or variables if needed, we write $x_1$ in terms of the other variables, and then substitute into the other equations. Repeat and terminate when we have no equations with non-zero coefficients left. We will get $$\pmat{A_{11} & A_{12} & A_{13} & \ldots & \ldots & \ldots & A_{1n} \\ 0 & A_{22}^{(2)} & A_{23}^{(2)} & \ldots & \ldots & \ldots & A_{2n}^{(2)} \\ \vdots & & \ddots &&& &\vdots \\ 0 & \ldots & 0 & A_{rr}^{(r)} & A_{r(r+1)}^{(r)} & \ldots & A_{rn}^{(n)} \\ 0 & \ldots & 0 & 0 & 0 & \ldots & 0 \\ \vdots &&&&&& \vdots \\ 0 & \ldots & \ldots & \ldots & \ldots & \ldots & 0} \pmat{x_1 \\ x_2 \\ x_3 \\ \vdots \\ x_n} = \pmat{d_1 \\ d_2 \\ \vdots \\ d_m} \quad \quad \begin{cases} A_{11} x_1 &+& A_{12} x_2 &+& \ldots &+&\ldots&+&A_{1n} x_n &=& d_1 \\ & &A_{22}^{(2)} x_2 &+&\ldots &+& \ldots &+& A_{2n}^{(2)} x_n &=& d_2^{(2)} \\ &&&\ddots &&&&&&&\vdots \\ &&&&A_{rr}^{(r)} x_r &+& \ldots &+& A_{rn}^{(r)} x_n &=& d_r^{(r)} \\ &&&&&&&&0 &=& d_{r+1}^{(r)} \\ &&&&&&&&\vdots &=& \vdots \\ &&&&&&&&0 &=& d_{n}^{(r)} \\ \end{cases}$$ with $A_{ii}^{(n)} \neq 0$ for all $i=1,2,\ldots,r$, where the superfix refers to the version number.

Overdetermined, determined and underdetermined system open_in_new
  • If $r<m$ and $d_i^{(r)} \neq 0$ for some $i=r+1,r+2,\ldots,m$, then the system is inconsistent, so there is no solution.
    We say the system is overdetermined.

  • If $r=n\leq m$ and all $d_i^{(r)} = 0$ for some $i=r+1,r+2,\ldots,m$, then last non-zero equation $$ A_{nn}^{(n)} x_n = d_n^{(n)} $$ can be solved, then performing back substitution gives a unique solution.
    We say the system is determined.

  • If $r<n$ and all $d_i^{(r)} = 0$ for some $i=r+1,r+2,\ldots,m$, then the last non-zero equation is $$A_{rr}^{(r)} x_r + A_{r(r+1)}^{(r)} x_{r+1} + \ldots + A_{rn}^{(r)} x_{n} = d_{r}^{(r)}, $$ so $x_{r+1}, \ldots, x_n$ can be chosen freely, and back substitution gives a valid solution.
    Therefore we have infinitely many solution.
    We say the system is underdetermined.

Upper triangular matrix of Gaussian elimination open_in_new

When $m=n$, $\det A = (-1)^R \det$ (the upper triangular matrix), where $R$ is the number of rearrangements of rows and columns.

Note that since the only $\sigma\in S_n$ such that $\sigma(i)\geq i$ for all $i=1,\ldots,n$ is the identity, $$ \det A = (-1)^R A_{11} A_{22}^{(2)} A_{33}^{(3)} \ldots A_{nn}^{(n)}. $$ Therefore $\det A=0$ iff $r<n$.

Matrix rank open_in_new

Definition (matrix rank) open_in_new

For an $m\times n$ matrix $A$, its rank is defined as $r(A) = r(\alpha)$, where $\alpha$ is the associated linear map $\alpha: \R^n \to \R^m$.

Theorem (row rank equals column rank) open_in_new

For an $m\times n$ matrix $A$, define the column rank of $A$ as the dimension of the spanning set of columns of $A$, and similarly for row rank. Then $$ \text{row rank} = \text{column rank} = r(A). $$

Proof

General solution of linear equations open_in_new

For the equation $$ A\v x = \v d $$ where $A$ is an $m\times n$ matrix.

Let $\set{\v u_i}_{i=1,2,\ldots,n(A)}$ be the basis of the kernel. Extend the basis to $\set{\v u_i}_{i=1,2,\ldots,n}$. Then $$ \im A = \mrm{span}\{A\v u_{n(A)+1}, \ldots A\v u_n\}.$$

  • If $\v d \not\in \im A$, then there is no solution.

  • If $\v d \in \im A$, then at least one solution exists. Let $\v x_0$ be a particular solution. The general can be written as $$ \v x = \v x_0 + \v y $$ where $\v y \in \ker A$.

    • If $n(A) = 0$, then $\v y = \v 0$ gives the only solution.

    • If $n(A) > 0$, then $$\v x = \v x_0 + \sum_{j=1}^{n(A)} \mu_j \v u_j.$$