# Definition of Vector
Vectors are special objects that can be added together and multiplied by scalars to produce another object of the same kind. From an abstract mathematical viewpoint, any object that satisfies these two properties can be considered a vector.
Under this definition, geometric vectors, polynomials, audio signals, elements of , and so on are all vectors.
# 2.1 Systems of Linear Equations
General form of a system of linear equations
To give a systematic approach to solving linear equations, we introduce a compact notation:
\begin{gather} \begin{bmatrix} a_{11} \\\\ \vdots \\\\ a_{m1} \end{bmatrix}x_1 + \begin{bmatrix} a_{12} \\\\ \vdots \\\\ a_{m2} \end{bmatrix}x_2 + \cdots + \begin{bmatrix} a_{1n} \\\\ \vdots \\\\ a_{mn} \end{bmatrix}x_n = \begin{bmatrix} b_{1} \\\\ \vdots \\\\ b_{m} \end{bmatrix}\Leftrightarrow\\[2em] \begin{bmatrix} a_{11} & \cdots & a_{1n} \\\\ \vdots & & \vdots \\\\ a_{m1} & \cdots & a_{mn} \end{bmatrix} \begin{bmatrix} x_{1} \\\\ \vdots \\\\ x_{n} \end{bmatrix} = \begin{bmatrix} b_{1} \\\\ \vdots \\\\ b_{m} \end{bmatrix} \end{gather}# 2.2 Matrices
Hardmard Product
An element-wise operation on matrix elements, i.e., .
# 2.3 Solving Systems of Linear Equations
# 2.3.1 Particular and General Solution
Consider the system of equations:
\begin{equation} \begin{bmatrix} 1 & 0 & 8 & -4\\\\ 0 & 1 & 2 & 12 \end{bmatrix} \begin{bmatrix} x_1\\\\ x_2\\\\ x_3\\\\ x_4 \end{bmatrix} = \begin{bmatrix} 42\\\\ 8 \end{bmatrix} \end{equation}We want to find scalars , such that , where is the th coloum of the matrix.
We find that
Thus one solution is , i.e., a paticular solution/ special solution.
We express the third column using the first two columns:
so that . Assume , we have
\begin{equation} \begin{bmatrix} 1 & 0 & 8 & -4\\\\ 0 & 1 & 2 & 12 \end{bmatrix}\left(\lambda_1 \begin{bmatrix} x_1\\\\ x_2\\\\ x_3\\\\ x_4 \end{bmatrix}\right) = \lambda_1(8\boldsymbol{c}_1 + 2\boldsymbol{c}_2 - \boldsymbol{c}_3) = \boldsymbol{0} \end{equation}Following the same line of reasoning, we express the fourth column of the matrix using the first two columns and get:
\begin{equation} \begin{bmatrix} 1 & 0 & 8 & -4\\\\ 0 & 1 & 2 & 12 \end{bmatrix}\left(\lambda_2 \begin{bmatrix} x_1\\\\ x_2\\\\ x_3\\\\ x_4 \end{bmatrix}\right) = \lambda_2(-4\boldsymbol{c}_1 + 12\boldsymbol{c}_2 - \boldsymbol{c}_4) = \boldsymbol{0} \end{equation}Then we get the general solution:
General Approach
- Find a particular solution to .
- Find all solutions to .
- Combine the solutions from steps 1. and 2. to the general solution.
# 2.3.2 Elementary Transformations
- Exchange of two equations (rows in the matrix representing the system
of equations) - Multiplication of an equation (row) with a constant
- Addition of two equations (rows)
Augmented Matrix
Assume , then we define the augmented matrix .
Row-Echelon Form
- All rows that contain only zeros are at the bottom of the matrix; correspondingly, all rows that contain at least one nonzero element are on top of rows that contain only zeros.
- Looking at nonzero rows only, the first nonzero number from the left
(also called the pivot or the leading coefficient) is always strictly to the right of the pivot of the row above it.
Basic and Free Variables
The variables corresponding to the pivots in the row-echelon form are called basic variables and the other variables are free variables. (Pivots are basic variables and the others are free variables.)
Obtaining a Particular Solution
Assume we have simplified augmented matrix:
We have , where are the pivot columns. The are determined easiest if we start with the rightmost pivot column and work our way to the left.
We can get . Therefore we get the paticular solution .
Reduced Row Echelon Form
An equation system is in reduced row-echelon form (also: row-reduced echelon form or row canonical form) if
- It is in row-echelon form.
- Every pivot is 1.
- The pivot is the only nonzero entry in its column.
Gaussian Elimination
Gaussian elimination is an algorithm that performs elementary transformations to bring a system of linear equations into reduced row-echelon form.
Obtain Solutions to
Assume we have a reduced row echelon form matrix:
The key idea for finding the solutions of is to look at the nonpivot columns, which we will need to express as a (linear) combination of the pivot columns.
Consider the second column, we have
Consider the fifth column, we have
Therefore, all solutions of are given by
# 2.3.3 The Minus-1 Trick
Minus-1 Trick
\begin{equation} \boldsymbol{A} = \begin{bmatrix} \boldsymbol{1} & 3 & 0 & 0 & 3 \\\\ 0 & 0 & \boldsymbol{1} & 0 & 9 \\\\ 0 & 0 & 0 & \boldsymbol{1} & -4 \end{bmatrix} \end{equation}We now augment this matrix to a matrix by adding rows of the
form at the places where the pivots on the diagonal are missing and obtain:
From this form, we can immediately read out the solutions of by
taking the columns of , which contain on the diagonal:
These columns form a basis (Section 2.6.1) of the solution space of , which we will later call the kernel or null space (see Section 2.7.3).
Calculating the Inverse
Using elementary transformation, we can get:
# 2.3.4 Algorithms for Solving a System of Linear Equations
When there is no solution, we need to resort to approximate
solutions. One way to solve the approximate problem is using the approach of linear regression.
Moore-Penrose pseudo-inverse
The Moore-Penrose pseudo-inverse determine the solution, which also corresponds to the minimum norm least-squares solution.
Disadvantage
It requires many computations for the matrix-matrix product and computing the inverse of . Moreover, for reasons of numerical precision it is generally not recommended to compute the inverse or pseudo-inverse.
In practice, systems of many linear equations are solved indirectly, by either stationary iterative methods, such as the Richardson method, the Jacobi method, the Gauss-Seidel method, and the successive over-relaxation method, or Krylov subspace methods, such as conjugate gradients, generalized minimal residual, or biconjugate gradients.
# 2.4 Vector Spaces
# 2.4.1 Groups
Definition (Group)
Consider a set and an operation defined on . Then is called a group if the following hold:
- Closure of under : .
- Associativity: .
- Neutral element: .
- Inverse element: ( is the neutral element and is usually denoted as ).
Abelian group
If additionally , then is an Abelian group.
Definition (General Linear Group)
The set of regular (invertible) matrices is a group with respect to matrix multiplication and is called general linear group . However, since matrix multiplication is not commutative, the group is not Abelian.
# 2.4.2 Vector Spaces
Definition (Vector Space)
A real-valued vector space is a set with inner operation and outer operation
where
- is an Abelian group.
- Distributivity:
- \forall \lambda \in \mathbb{R}, \boldsymbol{x}, \boldsymbol{y} \in \mathcal{V}:\lambda\cdot(\boldsymbol{x}+\boldsymbol{y}) = \lambda\cdot\boldsymbol{x} + \lambda\cdot\boldsymbol
- \forall \lambda, \psi \in \mathbb{R}, \boldsymbol{x} \in \mathcal{V}: (\lambda + \psi)\cdot \boldsymbol{x} = \lambda\cdot \boldsymbol{x} + \psi\cdot\boldsymbol
- Associativity (outer operation): \forall\lambda,\psi\in\mathbb{R}, \boldsymbol{x}\in \mathcal{V}: \lambda\cdot(\psi\cdot\boldsymbol{x}) = (\lambda\psi)\cdot\boldsymbol
- Neutral element with respect to the outer operation: \forall\boldsymbol{x} \in \mathcal{V}: 1\cdot \boldsymbol{x} = \boldsymbol
Multiplication by scalars and scalar product is different! (e.g.: is a multiplication by scalars while is a scalar product)
# 2.4.3 Vector Subspaces
Definition (Vector Subspace)
Let be a vector space and . Then is called vector subspace of (or linear subspace) if is a vector space with the vector space operation and restricted to and . We write to denote a subspace of . To determine is a subspace of we still do need to show
- , in particular: .
- Closure of :
a. With respect to the outer operation: .
b. With respect to the inner operation:.
Some Conclutions
- For every vector space , the trivial subspaces are itself and .
- The solution set of a homogeneous system of linear equations with unknowns is a subspace of .
- The solution of an inhomogeneous system of linear equations is not a subspace of .
- The intersection of arbitrarily many subspaces is a subspace itself.
# 2.5 Linear Independence
Definition (Linear Combination)
Consider a vector space and a finite number of vectors . Then, every of the form
with is a linear combination of the vectors .
Definition (Linear (In)dependence)
Consider a vector space with and . If there is a non-trivial linear combination, such that with at least one , the vectors are linear dependent. If only the trivial solution exists, i.e., , the vectors are linear independent.
Important properties
- If at least one of the vectors is then they are linearly dependent. The same holds if two vectors are identical.
- The vectors , are linear independent if and only if (at least) one of them is a linear combination of the others. In particular, if one vector is a multiple of another vector, i.e., , then the set is linearly dependent.
- A practical way of checking whether vectors and are linearly independent is to use Gaussian elimination: Write all vectors as columns of a matrix and perform Gaussian elimination until the matrix is in row echelon form (the reduced row-echelon form is unnecessary here):
- The pivot columns indicate the vectors, which are linearly independent of the vectors on the left. Note that there is an ordering of vectors when the matrix is built.
- The non-pivot columns can be expressed as linear combinations of the pivot columns on their left.
All column vectors are linearly independent if and only if all columns are pivot columns. If there is at least one non-pivot column, the columns (and, therefore, the corresponding vectors) are linearly dependent.
Consider a vector space with linearly independent vectors and linear combinations
Defining as the matrix whose columns are the linearly independent vectors , we have:
To test whether is linearly independent, we follow the general approach of testing whether , i.e., to test whether
This means that are linearly independent if and only if the column vectors are linearly independent.
In a vector space , linear combinations of vectors are linearly dependent if .
But why?
# 2.6 Basis and Rank
# 2.6.1 Generating Set and Basis
Definition (Generating Set and Span)
Consider a vector space and set of vectors . If every vector can be expressed as a linear combination of , is called a generating set of . The set of all linear combinations of vectors in is called the span of . If spans the vector space , we write or .
Definition (Basis)
Consider a vector space and . A generating set of is called minimal if there exists no smaller set that spans . Every linearly independent generating set of is minimal and is called a basis of .
Properties of Basis
Let be a vector space and . Then, the following statements are equivalent:
- is a basis of .
- is a minimal generating set.
- is a maximal linearly independent set of vectors in , i.e., adding any other vector to this set will make it linearly dependent.
- Every vector is a linear combination of vectors from , and every linear combination is unique, i.e., with
and , it follows that .
Definition (Basis Vector)
Every vector space possesses many different bases. However, all bases possess the same number of elements, the basis vectors.
Definition (Dimension)
The dimension of is the number of basis vectors of , denoted as . If , i.e., is a subspace of , then and if and only if . Intuitively, the dimension of a vector space can be thought of as the number of independent directions in this vector space. The dimension of a vector space is not necessarily the number of elements in a vector. For instance, the vector space is one-dimensional, although the basis vector possesses two elements.
Get a basis of a subspace
A basis of a subspace can be found by excuting the following steps:
- Write the spanning vectors as columns of a matrix .
- Determine the row-echelon form of .
- The spanning vectors associated with the pivot columns are a basis of .
# 2.6.2 Rank
Definition (Rank)
The number of linearly independent columns of a matrix equals the number of linearly independent rows and is called the rank of and is denoted by .
Important properties
- , i.e., the column rank equals the row rank.
- The columns of span a subspace with . This subspace is also called image or range. A basis of can be found by applying Gaussian elimination to to identify the pivot columns.
- The rows of span a subspace with . A basis of can be found by applying Gaussian elimination to .
- For all , if and only if is regular (invertible).
- For all and all it holds that the linear equation system can be solved if and only if .
- For all , the subspace of solutions for possesses dimension . This subspace is called the kernel or the null space.
- A matrix has full rank if . A matrix is said to be rank deficient if it does not have full rank.