# Linear algebra (Osnabrück 2024-2025)/Part II/Lecture 35/refcontrol

    Angle-preserving mappings

## Definition

A linear mappingMDLD/linear mapping
    $\varphi \colon V\longrightarrow W$
between euclidean vector spacesMDLD/euclidean vector spaces $V$ and $W$ is called angle-preserving, if for any two vectors $u,v\in V$, the relation
    $\angle (\varphi (u),\varphi (v))=\angle (u,v)\,$
Angles are only defined for vectors different from $0$. Therefore, angle-preserving mappings are injective. An isometryMDLD/isometry is always angle-preserving, because the norm and the angles are defined with respect to an inner product, and are not changed under an isometry. Further examples of angle-preserving mappings are homothetiesMDLD/homotheties by a scalar different from $0$, see exercise *****. An angle-preserving mapping maps orthogonal vectors to orthogonal vectors.

## Example Create referencenumber

Let
    $\varphi \colon \mathbb {C} \longrightarrow \mathbb {C}$
be a $\mathbb {C}$-linear mappingMDLD/linear mapping that is given by the multiplication with the complex number
    $w=a+b{\mathrm {i} }\neq 0\,.$
With respect to the real basis $1,{\mathrm {i} }$ of $\mathbb {C} =\mathbb {R} ^{2}$, this mapping is described by the real $2\times 2$-matrixMDLD/matrix
    ${\begin{pmatrix}a&-b\\b&a\end{pmatrix}}.$
We write this matrix as
    ${\begin{pmatrix}a&-b\\b&a\end{pmatrix}}={\begin{pmatrix}{\sqrt {a^{2}+b^{2}}}&0\\0&{\sqrt {a^{2}+b^{2}}}\end{pmatrix}}{\begin{pmatrix}{\frac {a}{\sqrt {a^{2}+b^{2}}}}&-{\frac {b}{\sqrt {a^{2}+b^{2}}}}\\{\frac {b}{\sqrt {a^{2}+b^{2}}}}&{\frac {a}{\sqrt {a^{2}+b^{2}}}}\end{pmatrix}}\,.$
Therefore, we have a composition of an isometry (a plane rotationMDLD/plane rotation) and of a homothetyMDLD/homothety with the scalar factor
    $\vert {w}\vert ={\sqrt {a^{2}+b^{2}}}\,;$
in particular, this is an angle-preserving mapping.MDLD/angle-preserving mapping

## TheoremCreate referencenumber

Let
    $\varphi \colon V\longrightarrow V$
denote an angle-preservingeMDLD/angle-preservinge (linear) linear mappingMDLD/linear mapping on the euclidean vector spaceMDLD/euclidean vector space $V$. Then there exists an isometryMDLD/isometry
    $\psi \colon V\longrightarrow V$
and a homothetyMDLD/homothety
    $\sigma \colon V\longrightarrow V$
such that
    $\varphi =\sigma \circ \psi \,.$

### Proof

Let
    $r=\det \varphi \,,$
and set
    $s:={\sqrt[{n}]{\vert {r}\vert }}\,,$
where $n$ denotes the dimension of $V$. Let $\sigma$ be the homothety with factor $s$. We consider the mapping
    $\psi :=\sigma ^{-1}\circ \varphi \,.$
This mapping is still angle-preserving and its determinant is $1$ or $-1$. Because of exercise *****, $\psi$ is an isometry.
$\Box$

## Remark

For an angle-preserving mappingMDLD/angle-preserving mapping
    $\varphi \colon V\longrightarrow W$
between euclidean vector spacesMDLD/euclidean vector spaces $V$ and $W$, not only the angles at the origin, but all angles are preserved. For points $P,Q,R\in V$, the angle of the triangle at $Q$ coincides with the angle at $\varphi (Q)$ of the image triangle $\varphi (P),\varphi (Q),\varphi (R)$, because of
    $\angle (P,Q,R)=\angle ({\overrightarrow {QP}},{\overrightarrow {QR}})=\angle (\varphi ({\overrightarrow {QP}}),\varphi ({\overrightarrow {QR}}))=\angle ({\overrightarrow {\varphi (Q)\varphi (P)}}),{\overrightarrow {\varphi (Q)\varphi (R)}})=\angle (\varphi (P),\varphi (Q),\varphi (R))\,.$
    Distances between sets

## Definition

For two nonempty subsets $A,B\subseteq M$ in a metric spaceMDLD/metric space $M$,
    $d(A,B):=\inf {\left(d(P,Q),\,P\in A,\,Q\in B\right)}\,$
is called the distance of the subsets
$A$
$B$
We will apply this concepts for normed vector spaces and for Euclidean vector spaces. For two points $P,Q\in V$, the distance between the sets $\{P\}$ and $\{Q\}$ equals $d(P,Q)$.
We will mainly work in situations where the infimumMDLD/infimum (R) is obtained, that is, the infimum is also a minimum. This is the typical behavior for linear objects.

## LemmaCreate referencenumber

Let $V$ be a euclidean vector space,MDLD/euclidean vector space $U\subseteq V$ a linear subspace,MDLD/linear subspace and $v\in V$. Then $p_{U}(v)$ is the point on $U$ that has, among all points of $U$, the minimal distance to $v$. In particular, we have
    $d(v,U)=d(v,p_{U}(v))\,.$

### Proof

For $u\in U$, we have, due to the Pythagorean theorem,
    $d(v,u)^{2}=d(v,p_{U}(v))^{2}+d(p_{U}(v),u)^{2}\,,$
as $p_{U}(v)-u\in U$ and $v-p_{U}(v)\in U^{\perp }$ are perpendicular to each other. This expression is minimal if and only if $d(p_{U}(v),u)=0$, and this holds if and only if
    $p_{U}(v)=u\,.$
$\Box$
In this context, $p_{U}(v)$ is also called the dropped perpendicular foot of $v$ on $U$.

## CorollaryCreate referencenumber

Let $V$ be a euclidean vector space,MDLD/euclidean vector space $U\subseteq V$ a linear subspace,MDLD/linear subspace and $v\in V$. Let $u_{1},\ldots ,u_{m}$ denote an orthonormal basisMDLD/orthonormal basis of $U$. Then
    $d(v,U)^{2}=\Vert {v}\Vert ^{2}-\sum _{i=1}^{m}\left\langle v,u_{i}\right\rangle ^{2}\,.$

### Proof

Because of Fact *****, we have
    $d(v,U)=d(v,p_{U}(v))\,,$
and, according to Fact *****, we have
    $p_{U}(v)=\sum _{i=1}^{m}\left\langle v,u_{i}\right\rangle u_{i}\,.$
We extend the orthonormal basis to an orthonormal basis $u_{1},\ldots ,u_{n}$ of $V$. Therefore, using the Pythagorean theorem, we have
    ${\begin{aligned}d(v,U)^{2}&=d{\left(v,\sum _{i=1}^{m}\left\langle v,u_{i}\right\rangle u_{i}\right)}^{2}\\&=d{\left(\sum _{i=1}^{n}\left\langle v,u_{i}\right\rangle u_{i},\sum _{i=1}^{m}\left\langle v,u_{i}\right\rangle u_{i}\right)}^{2}\\&=\Vert {\sum _{i=m+1}^{n}\left\langle v,u_{i}\right\rangle u_{i}}\Vert ^{2}\\&=\Vert {v}\Vert ^{2}-\Vert {\sum _{i=1}^{m}\left\langle v,u_{i}\right\rangle u_{i}}\Vert ^{2}\\&=\Vert {v}\Vert ^{2}-\sum _{i=1}^{m}\left\langle v,u_{i}\right\rangle ^{2}.\end{aligned}}$
$\Box$

## Example Create referencenumber

Let $J\subseteq \{1,\ldots ,n\}$, and let $U=\langle e_{i},\,i\in J\rangle \subseteq \mathbb {R} ^{n}$ denote the linear subspace spanned by this choice of standard vectors.MDLD/standard vectors Let
    $v={\begin{pmatrix}v_{1}\\\vdots \\v_{n}\end{pmatrix}}\,.$
Then, the distanceMDLD/distance (set) of $v$ to $U$ equals
    $d(v,U)={\sqrt {\sum _{i\not \in J}v_{i}^{2}}}\,.$
The dropped perpendicular foot of $v$ on $U$ is
    $p_{U}(v)={\begin{pmatrix}w_{1}\\\vdots \\w_{n}\end{pmatrix}}\,,$
where
    $w_{i}={\begin{cases}v_{i},\,{\text{ if }}i\in J,\,\\0,\,{\text{ if }}i\notin J\,.\end{cases}}\,$

## CorollaryCreate referencenumber

Let $a\in \mathbb {R} ^{n}$ be a vector with $\Vert {a}\Vert =1$, and let
    $U={\left\{x\in \mathbb {R} ^{n}\mid a_{1}x_{1}+\cdots +a_{n}x_{n}=0\right\}}=(\mathbb {R} a)^{\perp }\,$
denote the linear subspaceMDLD/linear subspace defined by $a$ as normal vektor.MDLD/normal vektor (hyperplane) Then, for a vector $v\in \mathbb {R} ^{n}$, the distanceMDLD/distance (set) to $U$ equals
    $d(U,v)=\vert {\left\langle a,v\right\rangle }\vert \,.$

### Proof

Let $a,u_{2},\ldots ,u_{n}$ be an orthonormal basisMDLD/orthonormal basis of $\mathbb {R} ^{n}$, and write
    $v=\lambda a+\sum _{i=2}^{n}c_{i}u_{i}\,.$
Then
    $p_{U}(v)=\sum _{i=2}^{n}c_{i}u_{i}\,,$
and, due to Fact *****, we have
    $d(U,v)=\Vert {v-p_{U}(v)}\Vert =\Vert {\lambda a}\Vert =\vert {\lambda }\vert \Vert {a}\Vert =\vert {\lambda }\vert \,.$
In conjunction with
    $\left\langle a,v\right\rangle =\left\langle a,\lambda a+\sum _{i=2}^{n}c_{i}u_{i}\right\rangle =\left\langle a,\lambda a\right\rangle =\lambda \,$
this yields the result.
$\Box$
These considerations do also hold for affine subspaces.

## Example Create referencenumber

Let $E$ be a real affine spaceMDLD/affine space over the euclidean vector spaceMDLD/euclidean vector space $V$, let $P\in E$ be a point, and let $F\subseteq E$ denote an affine subspace.MDLD/affine subspace In case $P\in F$, the distance of $P$ to $F$ equals $0$. In general, we write
    $F=Q+U\,$
with a point $Q\in F$ and with a linear subspaceMDLD/linear subspace $U\subseteq V$. We determine the orthogonal complementMDLD/orthogonal complement $W=U^{\perp }$ of $U$ in $V$. If $u_{1},\ldots ,u_{m}$ is a basisMDLD/basis (vs) of $U$, and $w_{1},\ldots ,w_{k}$ is a basis of $W$, then there exists a unique representation
    ${\overrightarrow {PQ}}=\sum _{i=1}^{m}a_{i}u_{i}+\sum _{j=1}^{k}b_{j}w_{j}\,.$
In this case,
    $L=P+\sum _{j=1}^{k}b_{j}w_{j}=Q-\sum _{i=1}^{m}a_{i}u_{i}\,$
is the dropped perpendicular foot of $P$ on $F$, and the distance of $P$ to $L$ is
    $d{\left(P,F\right)}=d{\left(P,L\right)}=\Vert {\sum _{j=1}^{k}b_{j}w_{j}}\Vert \,.$
If the $w_{j}$ form an orthonormal basisMDLD/orthonormal basis of $U$, then this equals ${\sqrt {\sum _{j=1}^{k}b_{j}^{2}}}$.

## Example Create referencenumber

We want to determine in the Euclidean plane the distance between the point $P={\begin{pmatrix}4\\5\end{pmatrix}}$ and the line $G$ given by $2x-3y=7$. The line has the form
    $G={\left\{{\begin{pmatrix}{\frac {7}{2}}\\0\end{pmatrix}}+t{\begin{pmatrix}3\\2\end{pmatrix}}\mid t\in \mathbb {R} \right\}}\,,$
and ${\begin{pmatrix}2\\-3\end{pmatrix}}$ is a vector perpendicular to $G$. We have
    ${\begin{pmatrix}{\frac {7}{2}}\\0\end{pmatrix}}-{\begin{pmatrix}4\\5\end{pmatrix}}={\begin{pmatrix}-{\frac {1}{2}}\\-5\end{pmatrix}}=-{\frac {23}{26}}{\begin{pmatrix}3\\2\end{pmatrix}}+{\frac {14}{13}}{\begin{pmatrix}2\\-3\end{pmatrix}}\,.$
Therefore, the dropped perpendicular foot is
    ${\begin{pmatrix}4\\5\end{pmatrix}}+{\frac {14}{13}}{\begin{pmatrix}2\\-3\end{pmatrix}}={\begin{pmatrix}{\frac {80}{13}}\\{\frac {23}{13}}\end{pmatrix}}\,,$
and the distance is
    ${\frac {14}{13}}{\sqrt {13}}.$

## LemmaCreate referencenumber

Let $V$ be a euclidean vector space,MDLD/euclidean vector space and let $E_{1}=P_{1}+U_{1}$ and $E_{2}=P_{2}+U_{2}$ denote nonempty affine subspacesMDLD/affine subspaces with the linear subspacesMDLD/linear subspaces $U_{1},U_{2}\subseteq V$. Let
    $P_{1}-P_{2}=u_{1}+u_{2}+u\,$
with $u_{1}\in U_{1}$, $u_{2}\in U_{2}$, and $u\in {\left(U_{1}+U_{2}\right)}^{\perp }$. Then the distanceMDLD/distance (set) $d(E_{1},E_{2})$ equals $\Vert {u}\Vert$; it is obtained in the points $P_{1}-u_{1}\in E_{1}$ and
$P_{2}+u_{2}\in E_{2}$
$E$
$F$

### Proof

We write $P-Q=u_{1}+u_{2}+u$ with $u_{1}\in U_{1}$, $u_{2}\in U_{2}$, and $u\in {\left(U_{1}+U_{2}\right)}^{\perp }$; such a decomposition does always exist, $u_{1},u_{2}$ are not uniquely determined (in case $U_{1}\cap U_{2}\neq 0$), but $u$ is uniquely determined. We have
    $P_{1}-u_{1}=P_{2}+u_{2}+u\,,$
and $Q_{1}:=P_{1}-u_{1}\in E_{1}$, and $Q_{2}:=P_{2}+u_{2}\in E_{2}$. The distance between $Q_{1}$ and $Q_{2}$ is $\Vert {u}\Vert$. For arbitrary points $R_{1}=Q_{1}+v_{1}\in E_{1}$ and $R_{2}=Q_{2}+v_{2}\in E_{2}$ fulfilling $v_{1}\in U_{1}$ and $v_{2}\in U_{2}$, we have
    ${\begin{aligned}d(R_{1},R_{2})^{2}&=\Vert {R_{1}-R_{2}}\Vert ^{2}\\&=\Vert {v_{1}-v_{2}+u}\Vert ^{2}\\&=\left\langle v_{1}-v_{2}+u,v_{1}-v_{2}+u\right\rangle \\&=\left\langle v_{1}-v_{2},v_{1}-v_{2}\right\rangle +\left\langle u,u\right\rangle \\&\geq \left\langle u,u\right\rangle ,\end{aligned}}$
that is,
    $d(R_{1},R_{2})\geq \Vert {u}\Vert \,.$
$\Box$
In the previous statement, the points where the minimum is obtained, are not unique determined; for example, think about two parallel lines in the plane. If the intersection of the linear spaces corresponding to $E,F$ equals $0$, then we have uniqueness. This is true in the case of skew lines.

## Example Create referencenumber

Two (affine) lines $G,H\subseteq \mathbb {R} ^{3}$ are called skew if they do not have any point in common and if they are also not parallel, meaning their vectors are linear independent. Then, these vectors generate a plane; there exists a vector $u$ perpendicular to this plane. We can compute one such vector, the normal vector, with the cross product.MDLD/cross product Let
    $G=P+\mathbb {R} v\,,$
and
    $H=Q+\mathbb {R} w\,.$
The linear system of equations
    $P-Q=av+bw+cu\,$
has a unique solution $(a,b,c)\in \mathbb {R} ^{3}$. Here, $P-av\in G$ and $Q+bw\in H$ are the dropped perpendicular feet, where the distance of the lines is obtained, according to Fact *****. This distance is $\Vert {cu}\Vert$.

## CorollaryCreate referencenumber

Let
    $G=P+\mathbb {R} v\,$
and
    $H=Q+\mathbb {R} w\,$
be skew lines in $\mathbb {R} ^{3}$, with vectors $v,w\in \mathbb {R} ^{3}$. Let $u$ be a normed vector that is perpendicular to $v$ and $w$. Then
    $d(G,H)=\vert {\left\langle P-Q,u\right\rangle }\vert \,.$

### Proof

We use example *****, and consider
    $P-Q=av+bw+cu\,.$
According to Cramer's rule, we obtain, using Lemma 33.3  (5) and that $u$ is a linear multiple of $v\times w$,
    ${\begin{aligned}c&={\frac {\det {\begin{pmatrix}v_{1}&w_{1}&P_{1}-Q_{1}\\v_{2}&w_{2}&P_{2}-Q_{2}\\v_{3}&w_{3}&P_{3}-Q_{3}\end{pmatrix}}}{\det {\begin{pmatrix}v_{1}&w_{1}&u_{1}\\v_{2}&w_{2}&u_{2}\\v_{3}&w_{3}&u_{3}\end{pmatrix}}}}\\&={\frac {\left\langle v\times w,P-Q\right\rangle }{\left\langle v\times w,u\right\rangle }}\\&={\frac {\left\langle u,P-Q\right\rangle }{\left\langle u,u\right\rangle }}\\&=\left\langle u,P-Q\right\rangle .\end{aligned}}$
$\Box$

## Example Create referencenumber

Let
    $G=P+\mathbb {R} v\,$
and
    $H=Q+\mathbb {R} w\,$
be skew lines. We want to understand the distance problem between the two lines as an extremal problem in the sense of higher-dimensional analysis. Let
    $P={\begin{pmatrix}a_{1}\\a_{2}\\a_{3}\end{pmatrix}}\,$
and
    $Q={\begin{pmatrix}b_{1}\\b_{2}\\b_{3}\end{pmatrix}}\,.$
The square of the distance between the two points
    $P'={\begin{pmatrix}a_{1}\\a_{2}\\a_{3}\end{pmatrix}}+s{\begin{pmatrix}v_{1}\\v_{2}\\v_{3}\end{pmatrix}}\,$
and
    $Q'={\begin{pmatrix}b_{1}\\b_{2}\\b_{3}\end{pmatrix}}+t{\begin{pmatrix}w_{1}\\w_{2}\\w_{3}\end{pmatrix}}\,$
is (setting $c_{i}=a_{i}-b_{i}$)
    ${\begin{aligned}d(P',Q')^{2}&={\left(c_{1}+sv_{1}-tw_{1}\right)}^{2}+{\left(c_{2}+sv_{2}-tw_{2}\right)}^{2}+{\left(c_{3}+sv_{3}-tw_{3}\right)}^{2}\\&=c_{1}^{2}+s^{2}v_{1}^{2}+t^{2}w_{1}^{2}+2sc_{1}v_{1}-2tc_{1}w_{1}-2stv_{1}w_{1}+c_{2}^{2}+s^{2}v_{2}^{2}+t^{2}w_{2}^{2}+2sa_{2}v_{2}-2tc_{2}w_{2}-2stv_{2}w_{2}+c_{3}^{2}+s^{2}v_{3}^{2}+t^{2}w_{3}^{2}+2sc_{3}v_{3}-2tc_{3}w_{3}-2stv_{3}w_{3}\\&=c_{1}^{2}+c_{2}^{2}+c_{3}^{2}+2s{\left(c_{1}v_{1}+c_{2}v_{2}+c_{3}v_{3}\right)}-2t{\left(c_{1}w_{1}+c_{2}w_{2}+c_{3}w_{3}\right)}+s^{2}{\left(v_{1}^{2}+v_{2}^{2}+v_{3}^{2}\right)}+t^{2}{\left(w_{1}^{2}+w_{2}^{2}+w_{3}^{2}\right)}-2st{\left(v_{1}w_{1}+v_{2}w_{2}+v_{3}w_{3}\right)}.\end{aligned}}$
We interpret this expression with methods of Analysis 2. We consider the data given by the lines as fixed parameters, so that we have an real-valued expression $f(s,t)$ in the two real variables $s$ and $t$, and we want to determine its extrema. The partial derivativesMDLD/partial derivatives are
    ${\frac {\partial f}{\partial s}}=2{\left(c_{1}v_{1}+c_{2}v_{2}+c_{3}v_{3}\right)}+2s{\left(v_{1}^{2}+v_{2}^{2}+v_{3}^{2}\right)}-2t{\left(v_{1}w_{1}+v_{2}w_{2}+v_{3}w_{3}\right)}\,$
and
    ${\frac {\partial f}{\partial t}}=2{\left(c_{1}w_{1}+c_{2}w_{2}+c_{3}w_{3}\right)}+2t{\left(w_{1}^{2}+w_{2}^{2}+w_{3}^{2}\right)}-2s{\left(v_{1}w_{1}+v_{2}w_{2}+v_{3}w_{3}\right)}\,.$
If we equate this with $0$, then we obtain an inhomogeneous linear system of equations with two equations in the variables $s$ and $t$. Using Cramer's rule, we get
    $s={\frac {\det {\begin{pmatrix}-c_{1}v_{1}-c_{2}v_{2}-c_{3}v_{3}&-v_{1}w_{1}-v_{2}w_{2}-v_{3}w_{3}\\-c_{1}w_{1}-c_{2}w_{2}-c_{3}w_{3}&w_{1}^{2}+w_{2}^{2}+w_{3}^{2}\end{pmatrix}}}{\det {\begin{pmatrix}v_{1}^{2}+v_{2}^{2}+v_{3}^{2}&-v_{1}w_{1}-v_{2}w_{2}-v_{3}w_{3}\\-v_{1}w_{1}-v_{2}w_{2}-v_{3}w_{3}&w_{1}^{2}+w_{2}^{2}+w_{3}^{2}\end{pmatrix}}}}\,$
and
    $t={\frac {\det {\begin{pmatrix}v_{1}^{2}+v_{2}^{2}+v_{3}^{2}&-c_{1}v_{1}-c_{2}v_{2}-c_{3}v_{3}\\-v_{1}w_{1}-v_{2}w_{2}-v_{3}w_{3}&-c_{1}w_{1}-c_{2}w_{2}-c_{3}w_{3}\end{pmatrix}}}{\det {\begin{pmatrix}v_{1}^{2}+v_{2}^{2}+v_{3}^{2}&-v_{1}w_{1}-v_{2}w_{2}-v_{3}w_{3}\\-v_{1}w_{1}-v_{2}w_{2}-v_{3}w_{3}&w_{1}^{2}+w_{2}^{2}+w_{3}^{2}\end{pmatrix}}}}\,.$
If $v$ and $w$ are normed, then these expressions can be simplified to
    $s={\frac {-\left\langle P-Q,v\right\rangle -\left\langle P-Q,w\right\rangle \left\langle v,w\right\rangle }{1-\left\langle v,w\right\rangle ^{2}}}\,$
and
    $t={\frac {-\left\langle P-Q,w\right\rangle -\left\langle P-Q,v\right\rangle \left\langle v,w\right\rangle }{1-\left\langle v,w\right\rangle ^{2}}}\,.$