\Section{linalg}
    \desc{Linear algebra}{}{}
    \desc[german]{Lineare Algebra}{}{}


    \Subsection{matrix}
        \desc{Matrix basics}{}{}
        \desc[german]{Matrizen Basics}{}{}

        \begin{formula}{matrix_matrix_product}
            \desc{Matrix-matrix product as sum}{}{}
            \desc[german]{Matrix-Matrix Produkt als Summe}{}{}
            \eq{C_{ij} = \sum_{k} A_{ik} B_{kj}}
        \end{formula}
        \begin{formula}{matrix_vector_product}
            \desc{Matrix-vector product as sum}{}{}
            \desc[german]{Matrix-Vektor Produkt als Summe}{}{}
            \eq{\vec{c}_{i} = \sum_{j} A_{ij} \vec{b}_{j}}
        \end{formula}

        \begin{formula}{symmetric}
            \desc{Symmetric matrix}{}{$A$ $n\times n$ \GT{matrix}}
            \desc[german]{Symmetrische matrix}{}{}
            \eq{A^\T = A}
        \end{formula}

        \begin{formula}{unitary}
            \desc{Unitary matrix}{}{}
            \desc[german]{Unitäre Matrix}{}{}
            \eq{U ^\dagger U = \id}
        \end{formula}

        \Subsubsection{transposed}
            \desc{Transposed matrix}{}{}
            \desc[german]{Transponierte Matrix}{}{}
            \begin{formula}{sum}
                \desc{Sum}{}{}
                \desc[german]{Summe}{}{}
                \eq{(A+B)^\T = A^\T + B^\T}
            \end{formula}
            \begin{formula}{product}
                \desc{Product}{}{}
                \desc[german]{Produkt}{}{}
                \eq{(AB)^\T = B^\T A^\T}
            \end{formula}
            \begin{formula}{inverse}
                \desc{Inverse}{}{}
                \desc[german]{Inverse}{}{}
                \eq{(A^{-1})^\T = (A^\T)^{-1}}
            \end{formula}
            \begin{formula}{exponential}
                \desc{Exponential}{}{}
                \desc[german]{Exponential}{}{}
                \eq{\exp(A^\T) = (\exp A)^\T \\ \ln(A^\T)=(\ln A)^\T}
            \end{formula}
        

    \Subsection{determinant}
        \desc{Determinant}{}{}
        \desc[german]{Determinante}{}{}
        \begin{formula}{2x2}
            \desc{2x2 matrix}{}{}
            \desc[german]{2x2 Matrix}{}{}
            \eq{\det \begin{pmatrix} a & b \\ c & d \end{pmatrix} = a\,d -c\,b}
        \end{formula}   
        \begin{formula}{3x3}
            \desc{3x3 matrix (Rule of Sarrus)}{}{}
            \desc[german]{3x3 Matrix (Regel von Sarrus)}{}{}
            \eq{\det \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix} = 
                a\,e\,i + b\,f\,g + c\,d\,h - g\,e\,c - h\,f\,a-i\,d\,b}
        \end{formula}   
        \begin{formula}{leibniz}
            \desc{Leibniz formla}{}{}
            \desc[german]{Leibniz-Formel}{}{}
            \eq{\det(A) = \sum_{\sigma \in S_n}\Big(\sgn(\sigma) \prod_{i=1}^n a_{i,\sigma(i)}\Big)}
        \end{formula}
        
        \begin{formula}{product}
            \desc{Product}{}{}
            \desc[german]{Produkt}{}{}
            \eq{\det(A \, B) = \det(A) \det(B)}
        \end{formula}
        \begin{formula}{inverse}
            \desc{Inverse}{}{}
            \desc[german]{Inverse}{}{}
            \eq{\det(A^{-1}) = \det(A)^{-1}}
        \end{formula}
        \begin{formula}{transposed}
            \desc{Transposed}{}{}
            \desc[german]{Transponiert}{}{}
            \eq{\det(A^{\T}) = \det(A)}
        \end{formula}


    \Subsection{misc}
        \desc{Misc}{}{}
        \desc[german]{Misc}{}{}

        \begin{formula}{normal_equation}
            \desc{Normal equation}{Solves a linear regression problem}{\mat{\theta} hypothesis / weight matrix, \mat{X} design matrix, \vec{y} output vector}
            % \desc[german]{}{}{}
            \eq{
                \mat{\theta} = (\mat{X}^\T \mat{X})^{-1} \mat{X}^\T \vec{y}
            }
        \end{formula}   

        \begin{formula}{woodbury_matrix_identity}
            \desc{Woodbury matrix identity}{Inverse of a rank-$k$ correction}{$\matA\,n\times n$, $\matU\,n\times k$, $\matC\,k\times k$, $\matV \, k\times n$}
            \desc[german]{Woodbury-Matrix-Identität}{Inverse einer Rang-$k$-Korrektur}{}
            \eq{(\matA + \matU + \matC + \matV){-1} = \matA^{-1}-\matA^{-1} \matU(\matC^{-1} + \matV \matA^{-1} \matU)^{-1} \matV \matA^{-1}}
        \end{formula}
        

        \begin{formula}{inverse_2x2}
            \desc{Inverse $2\times 2$ matrix}{}{}
            \desc[german]{Inverse $2\times 2$ Matrix}{}{}
            \eq{
                \begin{pmatrix} a & b\\ c & d \end{pmatrix}^{-1} =
                \frac{1}{ad-bc} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} 
            }
        \end{formula}

        \begin{formula}{svd}
            \desc{Singular value decomposition}{Factorization of complex matrices through rotating \rightarrow rescaling \rightarrow rotation.}{$A$: $m\times n$ matrix, $U$: $m\times m$ unitary matrix, $\Lambda$: $m\times n$ rectangular diagonal matrix with non-negative numbers on the diagonal, $V$: $n\times n$ unitary matrix}
            \desc[german]{Singulärwertzerlegung}{Faktorisierung einer reellen oder komplexen Matrix durch Rotation \rightarrow Skalierung \rightarrow Rotation.}{}
            \eq{A = U \Lambda V}
        \end{formula}

        \begin{formula}{rotation2}
            \desc{2D rotation matrix}{}{}
            \desc[german]{2D Rotationsmatrix}{}{}
            \eq{R = \begin{pmatrix} \cos\theta & -\sin\theta \\ \sin\theta & \cos\theta \end{pmatrix} }
        \end{formula}

        \begin{formula}{rotation3}
            \desc{3D rotation matrices}{}{}
            \desc[german]{3D Rotationsmatrizen}{}{}
            \eq{
                R_x &= \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos\theta & -\sin\theta \\ 0 & \sin\theta & \cos\theta \end{pmatrix}  \\
                R_y &= \begin{pmatrix} \cos\theta & 0 & \sin\theta \\ 0 & 1 & 0 \\  -\sin\theta & 0 & \cos\theta \end{pmatrix}  \\
                R_z &= \begin{pmatrix} \cos\theta & -\sin\theta & 0 \\ \sin\theta & \cos\theta & 0 \\ 0 & 0 & 1 \\ \end{pmatrix} 
            }
        \end{formula}

        \begin{formula}{rotation_properties}
            \desc{Properites of rotation matrices}{}{$n$ dimension, SO($n$) special othogonal group}
            \desc[german]{Eigenschaften von Rotationsmatrizen}{}{$n$ Dimension, SO($n$) spezielle orthognale Gruppe}
            \eq{
                R^{\T} = R^{-1} \\
                \det R = 1 \\
                R \in \text{SO($n$)}
            }
        \end{formula}


    \Subsection{eigen}
        \desc{Eigenvalues}{}{}
        \desc[german]{Eigenwerte}{}{}
        \begin{formula}{values}
            \desc{Eigenvalue equation}{}{$\lambda$ eigenvalue, $v$ eigenvector}
            \desc[german]{Eigenwert-Gleichung}{}{$\lambda$ Eigenwert, $v$ Eigenvektor}
            \eq{A v = \lambda v}
        \end{formula}

        \begin{formula}{charac_poly}
            \desc{Characteristic polynomial}{Zeros are the eigenvalues of $A$}{}
            \desc[german]{Charakteristisches Polynom}{Nullstellen sind die Eigenwerte von $A$}{}
            \eq{\chi_A = \det(A - \lambda \id) \overset{!}{=} 0}
        \end{formula}

        \begin{formula}{kramer}
            \desc{Kramer's theorem}{If $H$ is invariant under $T$ and $\ket{\psi}$ is an eigenstate of $H$, then $T\ket{\psi}$ is also am eigenstate of $H$}{}
            \desc[german]{Kramers-Theorem}{Wenn $H$ invariant unter $T$ ist und $\ket{\psi}$ ein Eigenzustand von $H$ ist, dann ist $T \ket{\psi}$ auch ein Eigenzustand von $H$}{}
            \eq{T H T^\dagger = H \quad\wedge\quad H \ket{\psi} = E \ket{\psi} \quad\Rightarrow\quad H T \ket{\psi} = E T \ket{\psi}}
        \end{formula}

        \begin{formula}{eigendecomp}
            \desc{Eigendecomposition}{}{$A$ diagonalizable, columns of $V$ are eigenvectors $v_i$, $\Lambda$ diagonal matrix with eigenvalues $\lambda_i$ on the diagonal}
            \desc[german]{Eigenwertzerlegung}{}{$A$ diagonalisierbar, Spalten von $V$ sind die Eigenvektoren $v_i$, $\Lambda$ Diagonalmatrix mit Eigenwerten $\lambda_i$ auf der Diagonalen}
            \eq{A = V \Lambda V^{-1}}
        \end{formula}

        \TODO{Jordan stuff, blockdiagonal matrices, permutations, skalar product lapacescher entwicklungssatz maybe, cramers rule}

