# Inner product/K/Orthogonality/Introduction/Section

When an inner product is given, then we can express the property of two vectors to be orthogonal to each other.

## Definition

Let $V$ denote a vector space over ${\mathbb {K} }$, endowed with an inner product $\left\langle -,-\right\rangle$. We say that two vectors $v,w\in V$ are orthogonal (or perpendicular) to each other if
    $\left\langle v,w\right\rangle =0\,$

## Remark

The following reasoning shows that the orthogonality, defined via the inner product, corresponds to the intuitively given orthogonality . For orthogonal vectors $u,v\in V$, we get that $v$ has the same distance to the points $u$ and $-u$. This holds because of
    ${\begin{aligned}\Vert {v-u}\Vert ^{2}&=\left\langle v-u,v-u\right\rangle \\&=\left\langle v,v\right\rangle +\left\langle u,u\right\rangle \\&=\left\langle v+u,v+u\right\rangle \\&=\Vert {v+u}\Vert ^{2}.\end{aligned}}$
The reverse statement holds as well; see exercise.
Let us recall the Theorem of Pythagoras.
The following theorem is the Theorem of Pythagoras; more precisely, it is the version in the context of an inner product, and it is trivial. However, the relation to the classical, elementary-geometric Theorem of Pythagoras is difficult, because it is not clear at all whether our concept of orthogonality and our concept of a length, both introduced via the inner product, coincide with the corresponding intuitive concepts. That our concept of a norm is the true length concept rests itself on the Theorem of Pythagoras in a Cartesian coordinate system, which presupposes the classical theorem.

## Theorem

Let $V$ be a ${\mathbb {K} }$-vector space, endowed with an inner product $\left\langle -,-\right\rangle$. Let $u,v\in V$ be vectors that are
orthogonal to each other. Then
    $\Vert {u+v}\Vert ^{2}=\Vert {u}\Vert ^{2}+\Vert {v}\Vert ^{2}\,$

### Proof

We have
    $\Vert {u+v}\Vert ^{2}=\left\langle u+v,u+v\right\rangle =\left\langle u,u\right\rangle +2\left\langle u,v\right\rangle +\left\langle v,v\right\rangle =\Vert {u}\Vert ^{2}+\Vert {v}\Vert ^{2}\,.$
$\Box$

## Definition

Let $V$ be a ${\mathbb {K} }$-vector space, endowed with an inner product, and let $U\subseteq V$ denote a linear subspace. Then
    $U^{\perp }={\left\{v\in V\mid \left\langle v,u\right\rangle =0{\text{ for all }}u\in U\right\}}\,$
$U$
The orthogonal complement of a linear subspace is again a linear subspace, see exercise. If a generating system of $U$ is given, then a vector $v\in V$ belongs to the orthogonal complement of $U$ if it is orthogonal to all the vectors of the generating system, see exercise.

## Example

Let $V=\mathbb {R} ^{n}$, endowed with the standard inner product. For the one-dimensional linear subspace $\mathbb {R} e_{i}$, generated by the standard vector $e_{i}$, the orthogonal complement consits of all vectors ${\begin{pmatrix}x_{1}\\\vdots \\x_{i-1}\\0\\x_{i+1}\\\vdots \\x_{n}\end{pmatrix}}$, where the $i$-th entry is $0$. For a one-dimensional linear subspace $\mathbb {R} v$, generated by a vector
    $v={\begin{pmatrix}a_{1}\\a_{2}\\\vdots \\a_{n}\end{pmatrix}}\neq 0\,,$
the orthogonal complement can be found by determining the solution space of the linear equation
    $a_{1}x_{1}+\cdots +a_{n}x_{n}=0\,.$
The orthogonal space
    $U=(\mathbb {R} v)^{\perp }={\left\{{\begin{pmatrix}x_{1}\\\vdots \\x_{n}\end{pmatrix}}\mid a_{1}x_{1}+\cdots +a_{n}x_{n}=0\right\}}\,$
has dimension $n-1$; this is a so-called hyperplane. The vector $v$ is called a normal vector for the hyperplane $U$.
For a linear subspace $U\subseteq \mathbb {R} ^{n}$ that is given by a basis (or a generating system) $v_{i}={\begin{pmatrix}a_{i1}\\\vdots \\a_{in}\end{pmatrix}}$, $i=1,\ldots ,k$, the orthogonal complement is the solution space of the system of linear equations
    $A{\begin{pmatrix}x_{1}\\\vdots \\x_{n}\end{pmatrix}}=0\,,$
where $A={\left(a_{ij}\right)}$ is the matrix formed by the vectors $v_{i}$ as rows.
* ↑ For this, one has to accept that the length defined via the inner product coincides with the intuitively defined length, which rests on the elementary-geometric Theorem of Pythagoras.