# Applied linear operators and spectral methods/Lecture 1

Linear operators can be thought of as infinite dimensional matrices. Hence we can use well known results from matrix theory when dealing with linear operators. However, we have to be careful. A finite dimensional matrix has an inverse if none of its eigenvalues are zero. For an infinite dimensional matrix, even though all the eigenvectors may be nonzero, we might have a sequence of eigenvalues that tend to zero. There are several other subtleties that we will discuss in the course of this series of lectures.
Let us start off with the basics, i.e., linear vector spaces.

## Linear Vector Spaces (S)

Let ${\mathcal {S}}$ be a linear vector space.

### Addition and scalar multiplication

Let us first define addition and scalar multiplication in this space. The addition operation acts completely in ${\mathcal {S}}$ while the scalar multiplication operation may involve multiplication either by a real (in $\mathbb {R}$) or by a complex number (in $\mathbb {C}$). These operations must have the following closure properties:
* If $\mathbf {x} ,\mathbf {y} \in {\mathcal {S}}$ then $\mathbf {x} +\mathbf {y} \in {\mathcal {S}}$.
* If $\alpha \in \mathbb {R}$ (or $\mathbb {C}$) and $\mathbf {x} \in {\mathcal {S}}$ then $\alpha ~\mathbf {x} \in {\mathcal {S}}$.
And the following laws must hold for addition
* $\mathbf {x} +\mathbf {y}$ = $\mathbf {y} +\mathbf {x} \qquad$ Commutative law.
* $\mathbf {x} +(\mathbf {y} +\mathbf {z} )$ = $(\mathbf {x} +\mathbf {y} )+\mathbf {z} \qquad$ Associative law.
* $\exists \mathbf {0} \in {\mathcal {S}}$ such that $\mathbf {0} +\mathbf {x} =\mathbf {x} \quad \forall \mathbf {x} \in {\mathcal {S}}\qquad$ Additive identity.
* $\forall \mathbf {x} \in {\mathcal {S}}\quad \exists -\mathbf {x} \in {\mathcal {S}}$ such that $-\mathbf {x} +\mathbf {x} =\mathbf {0} \qquad$ Additive inverse.
For scalar multiplication we have the properties
* $\alpha ~(\beta ~\mathbf {x} )=(\alpha ~\beta )~\mathbf {x}$.
* $(\alpha +\beta )~\mathbf {x} =\alpha ~\mathbf {x} +\beta ~\mathbf {x}$.
* $\alpha ~(\mathbf {x} +\mathbf {y} )=\alpha ~\mathbf {x} +\alpha ~\mathbf {y}$.
* $\mathbf {1} ~\mathbf {x} =\mathbf {x}$.
* $\mathbf {0} ~\mathbf {x} =\mathbf {0}$.

#### Example 1: n tuples

The $n$ tuples $(x_{1},x_{2},\dots ,x_{n})$ with
    ${\begin{aligned}(x_{1},x_{2},\dots ,x_{n})+(y_{1},y_{2},\dots ,y_{n})&=(x_{1}+y_{1},x_{2}+y_{2},\dots ,x_{n}+y_{n})\\\alpha ~(x_{1},x_{2},\dots ,x_{n})&=(\alpha ~x_{1},\alpha ~x_{2},\dots ,\alpha ~x_{n})\end{aligned}}$
form a linear vector space.

#### Example 2: Matrices

Another example of a linear vector space is the set of $2\times 2$ matrices with addition as usual and scalar multiplication, or more generally $n\times m$ matrices.
    $\alpha {\begin{bmatrix}x_{11}&x_{12}\\x_{21}&x_{22}\end{bmatrix}}={\begin{bmatrix}\alpha ~x_{11}&\alpha ~x_{12}\\\alpha ~x_{21}&\alpha ~x_{22}\end{bmatrix}}$

#### Example 3: Polynomials

The space of $n$-th order polynomials forms a linear vector space.
    $p_{n}=\sum _{j=1}^{n}\alpha _{j}~x^{j}$

#### Example 4: Continuous functions

The space of continuous functions, say in $[0,1]$, also forms a linear vector space with addition and scalar multiplication defined as usual.

### Linear Dependence

A set of vectors $\mathbf {x} _{1},\mathbf {x} _{2},\dots ,\mathbf {x} _{n}\in {\mathcal {S}}$ are said to be linearly dependent if $\exists ~\alpha _{1},\alpha _{2},\dots ,\alpha _{n}$ not all zero such that
    $\alpha ~\mathbf {x} _{1}+\alpha ~\mathbf {x} _{2}+\dots +\alpha ~\mathbf {x} _{n}=\mathbf {0}$
If such a set of constants $\alpha _{1},\alpha _{2},\dots ,\alpha _{n}$ does not exist then the vectors are said to be linearly independent.

#### Example

Consider the matrices
    ${\boldsymbol {M}}_{1}={\begin{bmatrix}1&0\\0&2\end{bmatrix}},{\boldsymbol {M}}_{2}={\begin{bmatrix}1&0\\0&0\end{bmatrix}},{\boldsymbol {M}}_{3}={\begin{bmatrix}0&0\\0&-1\end{bmatrix}}$
These are linearly dependent since ${\boldsymbol {M}}_{1}-{\boldsymbol {M}}_{2}+2~{\boldsymbol {M}}_{3}=\mathbf {0}$.

### Span

The span of a set of vectors $({\boldsymbol {T}})$ is the set of all vectors that are linear combinations of the vectors $\mathbf {x} _{i}$. Thus
    ${\text{span}}({\boldsymbol {T}})=\{{\boldsymbol {T}}_{1},{\boldsymbol {T}}_{2},\dots ,{\boldsymbol {T}}_{n}\}$
where
    ${\boldsymbol {T}}_{i}=\alpha _{1}~\mathbf {x} _{1}+\alpha _{2}~\mathbf {x} _{2}+\dots +\alpha _{n}~\mathbf {x} _{n}$
as $\alpha _{1},\alpha _{2},\dots ,\alpha _{n}$ vary.

#### Spanning set

If the span = ${\mathcal {S}}$ then ${\boldsymbol {T}}$ is said to be a spanning set.

### Basis

If ${\boldsymbol {T}}$ is a spanning set and its elements are linearly independent then we call it a basis for ${\mathcal {S}}$. A vector in ${\mathcal {S}}$ has a unique representation as a linear combination of the basis elements.
This is because adding two vectors is the same as adding the coefficients of the basis elements, and if any vector had two distinct representations, the basis would no longer be linearly independent, as ${\vec {v}}=a_{1}{\vec {e}}_{1}+a_{2}{\vec {e}}_{2}+\dots =b_{1}{\vec {e}}_{1}+b_{2}{\vec {e}}_{2}+\dots$implies that${\vec {v}}-{\vec {v}}=(a_{1}-b_{1}){\vec {e}}_{1}+(a_{2}-b_{2}){\vec {e}}_{2}+\dots ={\vec {0}}$which is only permissible (by linear independence) if the a$_i$−b$_i${\textstyle a_{i}-b_{i}} are all zero.

#### Dimension

The dimension of a space ${\mathcal {S}}$ is the number of elements in the basis. This is independent of actual elements that form the basis and is a property of ${\mathcal {S}}$.

#### Example 1: Vectors in R$^2$

Any two non-collinear vectors $\mathbb {R} ^{2}$ is a basis for $\mathbb {R} ^{2}$ because any other vector in $\mathbb {R} ^{2}$ can be expressed as a linear combination of the two vectors.

#### Example 2: Matrices

A basis for the linear space of $2\times 2$ matrices is
    ${\begin{bmatrix}1&0\\0&0\end{bmatrix}},{\begin{bmatrix}1&1\\0&0\end{bmatrix}},{\begin{bmatrix}1&1\\0&1\end{bmatrix}},{\begin{bmatrix}1&3\\1&1\end{bmatrix}}$
Note that there is a lot of nonuniqueness in the choice of bases. One important skill that you should develop is to choose the right basis to solve a particular problem.

#### Example 3: Polynomials

The set $\{1,x,x^{2},\dots ,x^{n}\}$ is a basis for polynomials of degree $n$.

#### Example 4: The natural basis

A natural basis is the set $\{\mathbf {e} _{1},\mathbf {e} _{2},\dots ,\mathbf {e} _{n}\}$ where the $j$th entry of $\mathbf {e} _{k}$ is
    $\delta _{jk}={\begin{cases}1&{\mbox{for}}~j=k\\0&{\mbox{for}}~j\neq k\end{cases}}$
The quantity $\delta _{jk}$ is also called the Kronecker delta.

### Inner Product Spaces

To give more structure to the idea of a vector space we need concepts such as magnitude and angle. The inner product provides that structure.
The inner product generalizes the concept of an angle and is defined as a function
    $\langle \bullet ,~\bullet \rangle :{\mathcal {S}}\times {\mathcal {S}}\rightarrow \mathbb {R} \quad ({\text{or}}~\mathbb {C} ~{\text{for a complex vector space}})$
with the properties
* $\langle \mathbf {x} ,~\mathbf {y} \rangle ={\overline {\langle \mathbf {y} ,~\mathbf {x} \rangle }}\qquad$ overbar indicates complex conjugation.
* $\langle \alpha ~\mathbf {x} ,~\mathbf {y} \rangle =\alpha ~\langle \mathbf {x} ,~\mathbf {y} \rangle \quad$ Linear with respect to scalar multiplication.
* $\langle \mathbf {x} +\mathbf {y} ,~\mathbf {z} \rangle =\langle \mathbf {x} ,~\mathbf {z} \rangle +\langle \mathbf {y} ,~\mathbf {z} \rangle \quad$ Linearity with respect to addition.
* $\langle \mathbf {x} ,~\mathbf {x} \rangle >\mathbf {0}$ if $\mathbf {x} \neq 0$ and $\langle \mathbf {x} ,~\mathbf {x} \rangle =\mathbf {0}$ if and only if $\mathbf {x} =\mathbf {0}$.
A vector space with an inner product is called an inner product space.

#### Example 1:

    $\langle \mathbf {x} ,~\beta ~\mathbf {y} \rangle ={\overline {\langle \beta ~\mathbf {y} ,~\mathbf {x} \rangle }}={\overline {\beta }}~{\overline {\langle \mathbf {y} ,~\mathbf {x} \rangle }}={\overline {\beta }}\langle \mathbf {x} ,~\mathbf {y} \rangle$

#### Example 2: Discrete vectors

In $\mathbb {R} ^{n}$ with $\mathbf {x} =\{x_{1},x_{2},\dots ,x_{n}\}$ and $\mathbf {y} =\{y_{1},y_{2},\dots ,y_{n}\}$ the Eulidean norm is given by
    $\langle \mathbf {x} ,~\mathbf {y} \rangle =\sum _{n}x_{n}~y_{n}$
With $\mathbf {x} ,\mathbf {y} \in \mathbb {C} ^{n}$ the standard norm is
    $\langle \mathbf {x} ,~\mathbf {y} \rangle =\sum _{k}x_{k}~{\overline {y_{k}}}$

#### Example 3: Continuous functions

For two complex valued continuous functions $f(x)$ and $g(x)$ in $[0,1]$ we could approximately represent them by their function values at equally spaced points.
Approximate $f(x)$ and $g(x)$ by
    ${\begin{aligned}F&=\{f(x_{1}),f(x_{2}),\dots ,f(x_{n})\}\qquad {\text{with}}~x_{k}={\cfrac {k}{n}}\\G&=\{g(x_{1}),g(x_{2}),\dots ,g(x_{n})\}\qquad {\text{with}}~x_{k}={\cfrac {k}{n}}\end{aligned}}$
With that approximation, a natural norm is
    $\langle F,~G\rangle ={\cfrac {1}{n}}~\sum _{k=1}^{n}f(x_{k})~{\overline {g(x_{k})}}$
Taking the limit as $n\rightarrow \infty$ (show this)
    $\langle f,~g\rangle =\int _{0}^{1}f(x)~{\overline {g(x)}}~dx$
If we took non-equally spaced yet smoothly distributed points we would get
    $\langle f,~g\rangle =\int _{0}^{1}f(x)~{\overline {g(x)}}~w(x)~dx$
where $w(x)>0$ is a smooth weighting function (show this).
There are many other inner products possible. For functions that are not only continuous but also differentiable, a useful norm is
    $\langle f,~g\rangle =\int _{0}^{1}\left[f(x)~{\overline {g(x)}}+f^{'}(x)~{\overline {g^{'}(x)}}\right]~dx$
We will continue further explorations into linear vector spaces in the next lecture.