Recent posts

Inverting matrices

· Code

Suppose you have a matrix \(A \in \mathbb{R}^{n \times n}\) and you want to invert it. I've already explained how to invert a matrix (English explanation), but I didn't provide any code and / or runtime analysis. C++ Code #include #include #include using namespace std; void … Read more »

Solving linear equations with Gaussian elimination

· Code

Please note that you should use LU-decomposition to solve linear equations. The following code produces valid solutions, but when your vector $b$ changes you have to do all the work again. LU-decomposition is faster in those cases and not slower in case you don't have to solve equations with the … Read more »

Solving equations of upper triangular matrices

· Code

Suppose you have an equation like \(R \cdot x = b\) with \(R \in \mathbb{R}^{n \times n}\) and \(x,b \in \mathbb{R}^n\). \(b\) and \(R\) are given and you want to solve for \(x\). Example With \(n=5\), the problem could look like this: $$\begin{pmatrix} 2 … Read more »

Solving equations of lower unitriangular matrices

· Code

Suppose you have an equation like \(L \cdot x = b\) with \(L \in \mathbb{R}^{n \times n}\) and \(x,b \in \mathbb{R}^n\). \(b\) and \(L\) are given and you want to solve for \(x\). Example With \(n=5\), the problem could look like this: $$\begin{pmatrix} 1 … Read more »

Part II: The Strassen algorithm in Python, Java and C++

· Code

This is Part II of my matrix multiplication series. Part I was about simple matrix multiplication algorithms and Part II was about the Strassen algorithm. Part III is about parallel matrix multiplication. The usual matrix multiplication of two \(n \times n\) matrices has a time-complexity of \(\mathcal{O}(n^3 … Read more »

Jordansche Normalform: 4x4 Matrizen

· German posts

Hier sind $4 \times 4$ Beispiele zum Hauptartikel Wie berechnet man die Jordan’sche Normalform?. Beispiel 1 Gegeben sei die Matrix \(A \in \mathbb{R}^{4 \times 4}\): $$A := \begin{pmatrix} 1 & 2 & 47 & 11\\ 3 & 2 & 8 & 15\\ 0 & 0 & 3 & 1\\ 0 & 0 & 8 & 1 \end{pmatrix}$$ Jordannormalform … Read more »

Berechnung der euklidischen Normalform

· German posts

Die euklidische Normalform einer linearen Isometrie, manchmal auch lineare Normalform genannt, hat folgende Gestalt: Bei einer \(n \times n\)-Matrix gilt also folgende Gleichung: \(n = p + q + 2r\) Bestimmung der Normalform Sei \(\Phi\) eine lineare Isometrie eines euklidischen Vektorraumes. Dann habe \(\Phi\) die Abbildungsmatrix \(A\). Sei \(B := A + A^T … Read more »

Jordansche Normalform: 2x2 Matrizen

· German posts

Hier sind $2 \times 2$ Beispiele zum Hauptartikel Wie berechnet man die Jordan’sche Normalform?. Beispiel 1 Gegeben sei die Matrix \(A \in \mathbb{R}^{2 \times 2}\): $$A := \begin{pmatrix} 11 & -4\\ 25 & -9 \end{pmatrix}$$ . Jordannormalform bestimmen 1. Charakteristisches Polynom berechnen: \(p_A(\lambda) = (\lambda - 1)^2\). Daraus folgt … Read more »

Wie berechnet man die Jordan'sche Normalform?

· German posts

Dieser Artikel beschreibt, wie die Jordansche Normalform einer Matrix sowie die dazugehörige Basiswechselmatrix gefunden werden kann. Dabei wird hier eine Jordansche Normalform erzeugt, bei der die 1er auf der oberen Nebendiagonale sind und die größten Jordankästchen zuerst kommen. Ich werde hier nicht erklären, warum es so funktioniert. Hier sind zwei … Read more »

Wie bestimme ich den Kern einer linearen Abbildung?

· German posts

Definition Der Kern einer linearen Abbildung ist eine Menge von Vektoren. In diesem Artikel erkläre ich kurz und bündig, wie man den Kern einer linearen Abbildung bestimmt. Definition: Sei \(\Phi: V \rightarrow W\) eine lineare Abbildung. Der Kern von \(\Phi\) ist die Menge aller Vektoren von \(V\), die durch \(\Phi … Read more »