# Hauptachsentransformation

> For AI agents: use [llms.txt](https://nakafa.com/llms.txt) for the site index. Markdown versions are available by appending `.md` to content URLs or sending `Accept: text/markdown`.

URL: https://nakafa.com/de/faecher/ki-und-data-science/lineare-methoden-der-ki/reelle-achsentransformation
Source: https://raw.githubusercontent.com/nakafaai/aksara/16d6b8e869d1a277313c65bbfc4b4a83efe77a46/packages/corpus/material/lesson/ai-ds/linear-methods/real-axis-transformation/de.mdx

Quadratische Formen durch einen orthogonalen Koordinatenwechsel diagonalisieren, quadratisch ergänzen und Kegelschnitte anhand ihrer Eigenwerte klassifizieren.

---

## Quadratische Formen mit symmetrischen Matrizen

Der gemischte Term einer quadratischen Gleichung kann ihre Geometrie verdecken. In Matrixform wird die symmetrische Matrix sichtbar, welche die Hauptachsen bestimmt. In zwei Dimensionen sei

Component: MathContainer
Children:

```math
A = \begin{pmatrix} a & b/2 \\ b/2 & c \end{pmatrix}
```

Da $$A$$ reell und symmetrisch ist, besitzt die Matrix reelle Eigenwerte $$\lambda_1,\lambda_2$$ und eine Orthonormalbasis aus Eigenvektoren $$v_1,v_2$$. Wir setzen $$S=(v_1\quad v_2)$$. Dann gelten $$S^TS=I$$ und $$S^TAS=\operatorname{diag}(\lambda_1,\lambda_2)$$.

Visible text: Da reell und symmetrisch ist, besitzt die Matrix reelle Eigenwerte und eine Orthonormalbasis aus Eigenvektoren . Wir setzen . Dann gelten und .

Für die Gleichung $$x^TAx+p^Tx+f=0$$ verwenden wir die gedrehten Koordinaten $$\xi=S^Tx$$ und den gedrehten linearen Koeffizienten $$(\delta,\epsilon)^T=S^Tp$$. Dadurch verschwindet der gemischte Term:

Visible text: Für die Gleichung verwenden wir die gedrehten Koordinaten und den gedrehten linearen Koeffizienten . Dadurch verschwindet der gemischte Term:

Component: MathContainer
Children:

```math
\lambda_1 \xi_1^2 + \lambda_2 \xi_2^2 + \delta \xi_1 + \epsilon \xi_2 + f = 0
```

## Quadratische Ergänzung

Für beide Variablen mit $$\lambda_1, \lambda_2 \neq 0$$ wird die Vervollständigung des Quadratprozesses separat durchgeführt:

Visible text: Für beide Variablen mit wird die Vervollständigung des Quadratprozesses separat durchgeführt:

Component: MathContainer
Children:

```math
\begin{aligned} 0 &= \lambda_1 \left( \xi_1^2 + 2 \frac{\delta}{2\lambda_1} \xi_1 + \frac{\delta^2}{4\lambda_1^2} \right) - \frac{\delta^2}{4\lambda_1} \\ &\quad + \lambda_2 \left( \xi_2^2 + 2 \frac{\epsilon}{2\lambda_2} \xi_2 + \frac{\epsilon^2}{4\lambda_2^2} \right) - \frac{\epsilon^2}{4\lambda_2} + f \end{aligned}
```

Nach dem Zusammenfassen erhalten wir

Component: MathContainer
Children:

```math
\begin{aligned} &= \lambda_1 \left( \xi_1 + \frac{\delta}{2\lambda_1} \right)^2 + \lambda_2 \left( \xi_2 + \frac{\epsilon}{2\lambda_2} \right)^2 \\ &\quad + \left( f - \frac{\delta^2}{4\lambda_1} - \frac{\epsilon^2}{4\lambda_2} \right) \end{aligned}
```

Wir definieren den Mittelpunkt in den gedrehten Koordinaten und die verschobene Konstante durch

Component: MathContainer
Children:

```math
(m_1,m_2)=\left(-\frac{\delta}{2\lambda_1},-\frac{\epsilon}{2\lambda_2}\right)
```

```math
\gamma=\frac{\delta^2}{4\lambda_1}+\frac{\epsilon^2}{4\lambda_2}-f
```

Damit gilt

Component: MathContainer
Children:

```math
\lambda_1 (\xi_1 - m_1)^2 + \lambda_2 (\xi_2 - m_2)^2 - \gamma = 0
```

Die Vorzeichen von $$\lambda_1$$, $$\lambda_2$$ und $$\gamma$$ entscheiden, ob die reelle Lösungsmenge eine Ellipse, Hyperbel, Parabel, ein entarteter Kegelschnitt oder leer ist. Die nächsten beiden Fälle setzen $$\gamma>0$$ voraus.

Visible text: Die Vorzeichen von , und entscheiden, ob die reelle Lösungsmenge eine Ellipse, Hyperbel, Parabel, ein entarteter Kegelschnitt oder leer ist. Die nächsten beiden Fälle setzen voraus.

## Kurvenklassifizierung

### Beide Eigenwerte positiv

Wenn $$\lambda_1 > 0$$ und $$\lambda_2 > 0$$, dann ist der gebildete Kegelschnitt eine **Ellipse**:

Visible text: Wenn und , dann ist der gebildete Kegelschnitt eine **Ellipse**:

Component: MathContainer
Children:

```math
\frac{(\xi_1 - m_1)^2}{r_1^2} + \frac{(\xi_2 - m_2)^2}{r_2^2} = 1
```

Mit Halbachsenlängen $$r_1 = \sqrt{\frac{\gamma}{\lambda_1}}$$ in Richtung $$v_1$$ und $$r_2 = \sqrt{\frac{\gamma}{\lambda_2}}$$ in Richtung $$v_2$$.

Visible text: Mit Halbachsenlängen in Richtung und in Richtung .

Component: LineEquation
Props:
- title: Ellipse in den Koordinaten $$\xi_1,\xi_2$$
  Visible text: Ellipse in den Koordinaten
- description: Ellipsenkurve mit positiven Eigenwerten und Hauptachsen, die an den Eigenvektorrichtungen ausgerichtet sind.
- data: [
{
points: Array.from({ length: 100 }, (_, i) => {
const t = (i / 99) * 2 * Math.PI;
const lambda1 = 2; // λ₁ > 0
const lambda2 = 1; // λ₂ > 0
const gamma = 16; // γ > 0
const m1 = 0; // δ/(2λ₁) = 0
const m2 = 0; // ε/(2λ₂) = 0
const r1 = Math.sqrt(gamma / lambda1);
const r2 = Math.sqrt(gamma / lambda2);
const x = Math.cos(t) * r1 + m1;
const y = Math.sin(t) * r2 + m2;
return { x, y, z: 0 };
}),
color: "#0891b2",
smooth: true,
showPoints: false
},
{
points: [
{ x: -4, y: 0, z: 0 },
{ x: 4, y: 0, z: 0 }
],
color: "#059669",
smooth: false,
showPoints: false,
labels: [
{
text: $$\xi_1$$,
at: 1,
offset: [0.3, -0.3, 0]
}
]
},
{
points: [
{ x: 0, y: -3, z: 0 },
{ x: 0, y: 3, z: 0 }
],
color: "#059669",
smooth: false,
showPoints: false,
labels: [
{
text: $$\xi_2$$,
at: 1,
offset: [0.3, 0.3, 0]
}
]
},
{
points: [
{ x: 0, y: 0, z: 0 }
],
color: "#e11d48",
smooth: false,
showPoints: true,
labels: [
{
text: <>Zentrum $$(m_1,m_2)$$</>,
at: 0,
offset: [0.4, 0.4, 0]
}
]
}
]
  Visible text: [
{
points: Array.from({ length: 100 }, (_, i) => {
const t = (i / 99) * 2 * Math.PI;
const lambda1 = 2; // λ₁ > 0
const lambda2 = 1; // λ₂ > 0
const gamma = 16; // γ > 0
const m1 = 0; // δ/(2λ₁) = 0
const m2 = 0; // ε/(2λ₂) = 0
const r1 = Math.sqrt(gamma / lambda1);
const r2 = Math.sqrt(gamma / lambda2);
const x = Math.cos(t) * r1 + m1;
const y = Math.sin(t) * r2 + m2;
return { x, y, z: 0 };
}),
color: "#0891b2",
smooth: true,
showPoints: false
},
{
points: [
{ x: -4, y: 0, z: 0 },
{ x: 4, y: 0, z: 0 }
],
color: "#059669",
smooth: false,
showPoints: false,
labels: [
{
text: ,
at: 1,
offset: [0.3, -0.3, 0]
}
]
},
{
points: [
{ x: 0, y: -3, z: 0 },
{ x: 0, y: 3, z: 0 }
],
color: "#059669",
smooth: false,
showPoints: false,
labels: [
{
text: ,
at: 1,
offset: [0.3, 0.3, 0]
}
]
},
{
points: [
{ x: 0, y: 0, z: 0 }
],
color: "#e11d48",
smooth: false,
showPoints: true,
labels: [
{
text: <>Zentrum </>,
at: 0,
offset: [0.4, 0.4, 0]
}
]
}
]
- cameraPosition: [0, 0, 12]
- showZAxis: false

### Eigenwerte mit entgegengesetzten Vorzeichen

Wenn $$\lambda_1 > 0$$ und $$\lambda_2 < 0$$, ist der gebildete Kegelschnitt eine **Hyperbel**:

Visible text: Wenn und , ist der gebildete Kegelschnitt eine **Hyperbel**:

Component: MathContainer
Children:

```math
\frac{(\xi_1 - m_1)^2}{r_1^2} - \frac{(\xi_2 - m_2)^2}{r_2^2} = 1
```

Mit Halbachsenlängen $$r_1 = \sqrt{\frac{\gamma}{\lambda_1}}$$ in Richtung $$v_1$$ und $$r_2 = \sqrt{\frac{\gamma}{-\lambda_2}}$$ in Richtung $$v_2$$.

Visible text: Mit Halbachsenlängen in Richtung und in Richtung .

Component: LineEquation
Props:
- title: Hyperbel in den Koordinaten $$\xi_1,\xi_2$$
  Visible text: Hyperbel in den Koordinaten
- description: Hyperbelkurve mit an Eigenvektorrichtungen ausgerichteten Hauptachsen und Zentrumstransformation.
- data: [
{
points: Array.from({ length: 60 }, (_, i) => {
const t = (i / 29 - 1) * 2.5;
const lambda1 = 2; // λ₁ > 0
const lambda2 = -1; // λ₂ < 0
const gamma = 3; // γ > 0
const r1 = Math.sqrt(gamma / lambda1);
const r2 = Math.sqrt(gamma / (-lambda2));
const x = Math.cosh(t) * r1;
const y = Math.sinh(t) * r2;
return { x, y, z: 0 };
}),
color: "#ea580c",
smooth: true,
showPoints: false
},
{
points: Array.from({ length: 60 }, (_, i) => {
const t = (i / 29 - 1) * 2.5;
const lambda1 = 2;
const lambda2 = -1;
const gamma = 3;
const r1 = Math.sqrt(gamma / lambda1);
const r2 = Math.sqrt(gamma / (-lambda2));
const x = -Math.cosh(t) * r1;
const y = Math.sinh(t) * r2;
return { x, y, z: 0 };
}),
color: "#ea580c",
smooth: true,
showPoints: false
},
{
points: Array.from({ length: 2 }, (_, i) => {
const lambda1 = 2;
const lambda2 = -1;
const gamma = 3;
const r1 = Math.sqrt(gamma / lambda1);
const r2 = Math.sqrt(gamma / (-lambda2));
const slope = r2 / r1; // positive Asymptotensteigung
const x = (i - 0.5) * 6; // von -3 bis 3
const y = slope * x;
return { x, y, z: 0 };
}),
color: "#0284c7",
smooth: false,
showPoints: false,
labels: [
{
text: $$r_1$$,
at: 1,
offset: [0.5, -0.5, 0]
}
]
},
{
points: Array. ... [truncated; 1983 chars]
  Visible text: [
{
points: Array.from({ length: 60 }, (_, i) => {
const t = (i / 29 - 1) * 2.5;
const lambda1 = 2; // λ₁ > 0
const lambda2 = -1; // λ₂ < 0
const gamma = 3; // γ > 0
const r1 = Math.sqrt(gamma / lambda1);
const r2 = Math.sqrt(gamma / (-lambda2));
const x = Math.cosh(t) * r1;
const y = Math.sinh(t) * r2;
return { x, y, z: 0 };
}),
color: "#ea580c",
smooth: true,
showPoints: false
},
{
points: Array.from({ length: 60 }, (_, i) => {
const t = (i / 29 - 1) * 2.5;
const lambda1 = 2;
const lambda2 = -1;
const gamma = 3;
const r1 = Math.sqrt(gamma / lambda1);
const r2 = Math.sqrt(gamma / (-lambda2));
const x = -Math.cosh(t) * r1;
const y = Math.sinh(t) * r2;
return { x, y, z: 0 };
}),
color: "#ea580c",
smooth: true,
showPoints: false
},
{
points: Array.from({ length: 2 }, (_, i) => {
const lambda1 = 2;
const lambda2 = -1;
const gamma = 3;
const r1 = Math.sqrt(gamma / lambda1);
const r2 = Math.sqrt(gamma / (-lambda2));
const slope = r2 / r1; // positive Asymptotensteigung
const x = (i - 0.5) * 6; // von -3 bis 3
const y = slope * x;
return { x, y, z: 0 };
}),
color: "#0284c7",
smooth: false,
showPoints: false,
labels: [
{
text: ,
at: 1,
offset: [0.5, -0.5, 0]
}
]
},
{
points: Array. ... [truncated; 1983 chars]
- cameraPosition: [0, 0, 12]
- showZAxis: false

### Ein Eigenwert Null

Ein Sonderfall liegt bei $$\lambda_1\neq0$$, $$\lambda_2=0$$ und $$\epsilon\neq0$$ vor. Die quadratische Ergänzung ergibt

Visible text: Ein Sonderfall liegt bei , und vor. Die quadratische Ergänzung ergibt

Component: MathContainer
Children:

```math
0 = \lambda_1 \left( \xi_1^2 + 2 \frac{\delta}{2\lambda_1} \xi_1 + \frac{\delta^2}{4\lambda_1^2} \right) - \frac{\delta^2}{4\lambda_1} + \epsilon \xi_2 + f
```

```math
= \lambda_1 \left( \xi_1 + \frac{\delta}{2\lambda_1} \right)^2 + \epsilon \xi_2 + \left( f - \frac{\delta^2}{4\lambda_1} \right)
```

```math
= \lambda_1 (\xi_1 - m_1)^2 + \epsilon \xi_2 - \gamma
```

Nach dem Auflösen nach $$\xi_2$$ ist die Parabelform unmittelbar erkennbar:

Visible text: Nach dem Auflösen nach ist die Parabelform unmittelbar erkennbar:

Component: MathContainer
Children:

```math
\xi_2 = -\frac{\lambda_1}{\epsilon} (\xi_1 - m_1)^2 + \frac{\gamma}{\epsilon}
```

Component: LineEquation
Props:
- title: Parabel in den Koordinaten $$\xi_1,\xi_2$$
  Visible text: Parabel in den Koordinaten
- description: Parabelkurve mit einem Null-Eigenwert und an Eigenvektoren ausgerichteter Koordinatenachsentransformation.
- data: [
{
points: Array.from({ length: 50 }, (_, i) => {
const t = (i / 49 - 0.5) * 6;
const lambda1 = 1; // λ₁ ≠ 0
const epsilon = -2; // ε ≠ 0
const gamma = 2; // γ
const m1 = 0; // δ/(2λ₁) = 0
const x = t;
const y = -(lambda1 / epsilon) * Math.pow(x - m1, 2) + (gamma / epsilon);
return { x, y, z: 0 };
}),
color: "#9333ea",
smooth: true,
showPoints: false
},
{
points: [
{ x: -3.5, y: 0, z: 0 },
{ x: 3.5, y: 0, z: 0 }
],
color: "#0891b2",
smooth: false,
showPoints: false,
labels: [
{
text: $$\xi_1$$,
at: 1,
offset: [0.3, -0.3, 0]
}
]
},
{
points: [
{ x: 0, y: -0.5, z: 0 },
{ x: 0, y: 4, z: 0 }
],
color: "#0891b2",
smooth: false,
showPoints: false,
labels: [
{
text: $$\xi_2$$,
at: 1,
offset: [0.3, 0.3, 0]
}
]
}
]
  Visible text: [
{
points: Array.from({ length: 50 }, (_, i) => {
const t = (i / 49 - 0.5) * 6;
const lambda1 = 1; // λ₁ ≠ 0
const epsilon = -2; // ε ≠ 0
const gamma = 2; // γ
const m1 = 0; // δ/(2λ₁) = 0
const x = t;
const y = -(lambda1 / epsilon) * Math.pow(x - m1, 2) + (gamma / epsilon);
return { x, y, z: 0 };
}),
color: "#9333ea",
smooth: true,
showPoints: false
},
{
points: [
{ x: -3.5, y: 0, z: 0 },
{ x: 3.5, y: 0, z: 0 }
],
color: "#0891b2",
smooth: false,
showPoints: false,
labels: [
{
text: ,
at: 1,
offset: [0.3, -0.3, 0]
}
]
},
{
points: [
{ x: 0, y: -0.5, z: 0 },
{ x: 0, y: 4, z: 0 }
],
color: "#0891b2",
smooth: false,
showPoints: false,
labels: [
{
text: ,
at: 1,
offset: [0.3, 0.3, 0]
}
]
}
]
- cameraPosition: [0, 0, 12]
- showZAxis: false

## Vollständig gerechnetes Beispiel

Wir betrachten die Gleichung

Component: MathContainer
Children:

```math
5x_1^2+4x_1x_2+2x_2^2-6x_1-9=0
```

```math
A=\begin{pmatrix}5&2\\2&2\end{pmatrix},\qquad p=\begin{pmatrix}-6\\0\end{pmatrix}
```

Die Eigenpaare lauten

Component: MathContainer
Children:

```math
\lambda_1=6,\quad v_1=\frac1{\sqrt5}\begin{pmatrix}2\\1\end{pmatrix},\qquad \lambda_2=1,\quad v_2=\frac1{\sqrt5}\begin{pmatrix}-1\\2\end{pmatrix}
```

```math
S=\frac1{\sqrt5}\begin{pmatrix}2&-1\\1&2\end{pmatrix},\qquad \xi=S^Tx
```

Der Mittelpunkt in den ursprünglichen Koordinaten ist $$h=(1,-1)^T$$, denn $$2Ah+p=0$$. In den gedrehten Koordinaten gilt $$m=S^Th=(1/\sqrt5,-3/\sqrt5)^T$$. Mit $$\eta=\xi-m$$ wird die Gleichung zu

Visible text: Der Mittelpunkt in den ursprünglichen Koordinaten ist , denn . In den gedrehten Koordinaten gilt . Mit wird die Gleichung zu

Component: MathContainer
Children:

```math
6\eta_1^2+\eta_2^2=12
```

```math
\frac{\eta_1^2}{2}+\frac{\eta_2^2}{12}=1
```

Die Kurve ist eine Ellipse mit Mittelpunkt $$(1,-1)$$. Ihre Halbachsen haben die Längen $$\sqrt2$$ in Richtung $$v_1$$ und $$2\sqrt3$$ in Richtung $$v_2$$. Setzt man den Mittelpunkt in die ursprüngliche Gleichung ein, erhält man $$-12$$, passend zur rechten Seite nach der Verschiebung.

Visible text: Die Kurve ist eine Ellipse mit Mittelpunkt . Ihre Halbachsen haben die Längen in Richtung und in Richtung . Setzt man den Mittelpunkt in die ursprüngliche Gleichung ein, erhält man , passend zur rechten Seite nach der Verschiebung.

## Quadratische Flächen und Transformation

Für eine symmetrische Matrix $$A \in \mathbb{R}^{n \times n}$$, einen Vektor $$b \in \mathbb{R}^n$$ und einen Skalar $$c \in \mathbb{R}$$ ist die **quadratische Oberfläche** $$Q$$ als Lösungsmenge der allgemeinen quadratischen Gleichung definiert:

Visible text: Für eine symmetrische Matrix , einen Vektor und einen Skalar ist die **quadratische Oberfläche** als Lösungsmenge der allgemeinen quadratischen Gleichung definiert:

Component: MathContainer
Children:

```math
x^T A x + b^T x + c = 0
```

Äquivalent dazu gilt

Component: MathContainer
Children:

```math
Q = \left\{ x \in \mathbb{R}^n : x^T A x + b^T x + c = 0 \right\}
```

```math
= \left\{ x \in \mathbb{R}^n : \sum_{j=1}^n \sum_{k=1}^n x_j a_{jk} x_k + \sum_{j=1}^n b_j x_j + c = 0 \right\}
```

Wenn $$A \in \mathbb{R}^{n \times n}$$ symmetrisch und $$v_1, \ldots, v_n \in \mathbb{R}^n$$ eine Orthonormalbasis von Eigenvektoren mit $$A \cdot v_i = \lambda_i \cdot v_i$$ ist, dann ermöglicht die Orthonormalmatrix $$S = (v_1 \quad \ldots \quad v_n)$$ die Diagonalisierung $$A \cdot S = S \cdot \Lambda$$ oder $$\Lambda = S^{-1} \cdot A \cdot S = S^T \cdot A \cdot S$$.

Visible text: Wenn symmetrisch und eine Orthonormalbasis von Eigenvektoren mit ist, dann ermöglicht die Orthonormalmatrix die Diagonalisierung oder .

In der neuen Koordinatenbasis $$\xi = S^T x$$ und $$\mu = S^T b$$ hat die quadratische Fläche Diagonalform:

Visible text: In der neuen Koordinatenbasis und hat die quadratische Fläche Diagonalform:

Component: MathContainer
Children:

```math
Q = \left\{ \xi \in \mathbb{R}^n : \xi^T S^T A S \xi + b^T S \xi + c = 0 \right\}
```

```math
= \left\{ \xi \in \mathbb{R}^n : \xi^T \Lambda \xi + \mu^T \xi + c = 0 \right\}
```

```math
= \left\{ \xi \in \mathbb{R}^n : \sum_{j=1}^n \lambda_j \xi_j^2 + \sum_{j=1}^n \mu_j \xi_j + c = 0 \right\}
```

```math
= \left\{ \xi \in \mathbb{R}^n : \sum_{j=1}^n (\lambda_j \xi_j^2 + \mu_j \xi_j) = -c \right\}
```

In der Orthonormalbasis von Eigenvektoren hat die quadratische Form eine Diagonalstruktur. Diese Transformation wird **Hauptachsentransformation** genannt, da die neuen Koordinatenachsen an den Richtungen der Matrixeigenvektoren ausgerichtet sind.