Fortgeschritten ~17 Min. Mathematik & Logik

Matrizen — Rechnen mit Tabellen

Lernziele

  • Eine Matrix als geordnetes Zahlenschema beschreiben und ihre Dimension angeben
  • Matrizen addieren, subtrahieren und mit einem Skalar multiplizieren
  • Matrizen miteinander multiplizieren und die Nicht-Kommutativität erklären
  • Die Determinante einer 2×2-Matrix berechnen und deuten
  • Anwendungen von Matrizen in Geometrie und LGS erkennen

Einführung

Eine Tabelle mit Zahlen — das ist eine Matrix. Klingt einfach, ist aber eines der mächtigsten Werkzeuge der Mathematik. Matrizen beschreiben lineare Gleichungssysteme, geometrische Transformationen (Drehungen, Spiegelungen), Netzwerke und sogar neuronale Netze.

Wer Matrizen versteht, versteht die Sprache, in der Computer lineare Strukturen verarbeiten. Fast jede technische Berechnung — von der Computergrafik bis zur Statistik — steckt dahinter.

Grundidee

Stelle dir eine Tabelle vor: Zeilen und Spalten. Jeder Eintrag hat eine feste Position. Du kannst solche Tabellen addieren (Eintrag für Eintrag), mit einer Zahl skalieren (alle Einträge multiplizieren) — so wie du Vektoren behandelst.

Das Besondere kommt bei der Multiplikation: Zwei Tabellen miteinander zu multiplizieren ist kein einfaches Eintrag-mal-Eintrag, sondern ein strukturiertes Zeile-mal-Spalte-Verfahren. Damit lassen sich geometrische Abbildungen hintereinanderschalten und Gleichungssysteme kompakt lösen.

Erklärung

Was ist eine Matrix?

Eine m×nm \times n-Matrix hat mm Zeilen und nn Spalten:

A=(a11a12a1na21a22a2nam1am2amn)A = \begin{pmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{pmatrix}

Der Eintrag aija_{ij} steht in Zeile ii und Spalte jj. Beispiel: Eine 2×32 \times 3-Matrix hat 2 Zeilen und 3 Spalten:

A=(123456)A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}

Addition und Skalarmultiplikation

Addition: Nur Matrizen gleicher Dimension lassen sich addieren — Eintrag für Eintrag:

(1234)+(5012)=(6226)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} + \begin{pmatrix} 5 & 0 \\ -1 & 2 \end{pmatrix} = \begin{pmatrix} 6 & 2 \\ 2 & 6 \end{pmatrix}

Skalarmultiplikation: Jeder Eintrag wird mit dem Skalar multipliziert:

3(1201)=(3603)3 \cdot \begin{pmatrix} 1 & 2 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} 3 & 6 \\ 0 & -3 \end{pmatrix}

Matrizenmultiplikation

Das Produkt C=ABC = A \cdot B ist nur definiert, wenn die Spaltenzahl von AA gleich der Zeilenzahl von BB ist. Ist AA eine m×km \times k-Matrix und BB eine k×nk \times n-Matrix, so ist CC eine m×nm \times n-Matrix.

Der Eintrag CijC_{ij} entsteht als Skalarprodukt der ii-ten Zeile von AA mit der jj-ten Spalte von BB:

Cij=kAikBkjC_{ij} = \sum_{k} A_{ik} \cdot B_{kj}

Beispiel:

(1234)(5678)=(15+2716+2835+4736+48)=(19224350)\begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix} \cdot \begin{pmatrix} 5 & 6 \\ 7 & 8 \end{pmatrix} = \begin{pmatrix} 1\cdot5+2\cdot7 & 1\cdot6+2\cdot8 \\ 3\cdot5+4\cdot7 & 3\cdot6+4\cdot8 \end{pmatrix} = \begin{pmatrix} 19 & 22 \\ 43 & 50 \end{pmatrix}

Matrizenmultiplikation ist nicht kommutativ

Im Allgemeinen gilt ABBAA \cdot B \neq B \cdot A. Die Reihenfolge der Faktoren ist entscheidend! Das ist der größte Unterschied zur Multiplikation von Zahlen.

Die Einheitsmatrix

Die Einheitsmatrix InI_n ist die n×nn \times n-Matrix mit Einsen auf der Hauptdiagonalen und Nullen sonst:

I2=(1001),I3=(100010001)I_2 = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}, \quad I_3 = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix}

Sie ist das neutrale Element der Matrizenmultiplikation: AI=IA=AA \cdot I = I \cdot A = A.

Determinante einer 2×2-Matrix

Für eine 2×22 \times 2-Matrix A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} ist die Determinante:

detA=adbc\det A = ad - bc

Sie gibt an, ob die Matrix invertierbar ist: Ist detA0\det A \neq 0, existiert eine inverse Matrix A1A^{-1}. Geometrisch beschreibt detA|\det A| den Flächenskalierungsfaktor einer linearen Abbildung.

Beispiel: det(3124)=3412=10\det \begin{pmatrix} 3 & 1 \\ 2 & 4 \end{pmatrix} = 3 \cdot 4 - 1 \cdot 2 = 10

Determinante entscheidet über Lösbarkeit

Ein LGS Ax=bA\vec{x} = \vec{b} hat genau dann eine eindeutige Lösung, wenn detA0\det A \neq 0. Ist detA=0\det A = 0, ist die Koeffizientenmatrix singulär — keine oder unendlich viele Lösungen.

Die inverse Matrix

Zu einer invertierbaren 2×22 \times 2-Matrix A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} ist die Inverse:

A1=1detA(dbca)A^{-1} = \frac{1}{\det A} \begin{pmatrix} d & -b \\ -c & a \end{pmatrix}

Es gilt: AA1=A1A=IA \cdot A^{-1} = A^{-1} \cdot A = I.

Das LGS Ax=bA\vec{x} = \vec{b} lässt sich dann formal lösen als x=A1b\vec{x} = A^{-1}\vec{b}.

Transformationen als Matrizen

Geometrische Abbildungen in der Ebene lassen sich als Matrizenmultiplikation schreiben:

Drehung um den Ursprung um den Winkel φ\varphi: Dφ=(cosφsinφsinφcosφ)D_\varphi = \begin{pmatrix} \cos\varphi & -\sin\varphi \\ \sin\varphi & \cos\varphi \end{pmatrix}

Spiegelung an der xx-Achse: Sx=(1001)S_x = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}

Einen Vektor v\vec{v} zu transformieren bedeutet: v=Dφv\vec{v}' = D_\varphi \cdot \vec{v}.

Beispiel aus dem Alltag

Netzwerkanalyse: In einem Straßennetz mit 3 Knotenpunkten kann man die Verbindungsstruktur als Adjazenzmatrix darstellen: Aij=1A_{ij} = 1, wenn Knoten ii direkt mit Knoten jj verbunden ist, sonst 00.

Das Quadrat dieser Matrix A2A^2 enthält in Eintrag (i,j)(i, j) die Anzahl der Wege der Länge 2 von ii nach jj — direkt als Matrizenmultiplikation!

Computergrafik: Drehungen, Skalierungen und Spiegelungen eines 3D-Modells werden als 4×44\times4-Matrizen gespeichert. Hintereinanderschalten von Transformationen = Matrizenmultiplikation. Das macht Echtzeit-3D-Grafik überhaupt erst berechenbar.

Anwendung

Aufgabe 1: Berechne ABA \cdot B für A=(2113)A = \begin{pmatrix} 2 & 1 \\ -1 & 3 \end{pmatrix} und B=(1021)B = \begin{pmatrix} 1 & 0 \\ 2 & -1 \end{pmatrix}.

Lösung: AB=(21+1220+1(1)(1)1+32(1)0+3(1))=(4153)A \cdot B = \begin{pmatrix} 2\cdot1+1\cdot2 & 2\cdot0+1\cdot(-1) \\ (-1)\cdot1+3\cdot2 & (-1)\cdot0+3\cdot(-1) \end{pmatrix} = \begin{pmatrix} 4 & -1 \\ 5 & -3 \end{pmatrix}

Aufgabe 2: Bestimme detA\det A und A1A^{-1} für A=(4213)A = \begin{pmatrix} 4 & 2 \\ 1 & 3 \end{pmatrix}.

Lösung: detA=122=10\det A = 12 - 2 = 10. A1=110(3214)A^{-1} = \frac{1}{10}\begin{pmatrix} 3 & -2 \\ -1 & 4 \end{pmatrix}.

Aufgabe 3: Schreibe das LGS 2x+y=52x + y = 5, x3y=1x - 3y = 1 als Matrixgleichung Ax=bA\vec{x} = \vec{b}.

Lösung: (2113)(xy)=(51)\begin{pmatrix} 2 & 1 \\ 1 & -3 \end{pmatrix}\begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 5 \\ 1 \end{pmatrix}.

Typische Fehler

Häufiger Irrtum
Häufiger Irrtum

Zusammenfassung

Merke dir:

  • Eine m×nm \times n-Matrix hat mm Zeilen und nn Spalten; Eintrag aija_{ij} sitzt in Zeile ii, Spalte jj
  • Addition und Skalarmultiplikation funktionieren komponentenweise — nur für Matrizen gleicher Dimension
  • Matrizenmultiplikation: Cij=kAikBkjC_{ij} = \sum_k A_{ik} B_{kj} — Zeile ×\times Spalte, nicht kommutativ
  • Die Einheitsmatrix II ist das neutrale Element: AI=IA=AAI = IA = A
  • Die Determinante detA=adbc\det A = ad - bc entscheidet über Invertierbarkeit (und LGS-Lösbarkeit)
  • Geometrische Transformationen (Drehung, Spiegelung) werden durch Matrizenmultiplikation dargestellt

Quiz

Frage 1: Warum kann man (123)(45)\begin{pmatrix} 1 & 2 & 3 \end{pmatrix} \cdot \begin{pmatrix} 4 & 5 \end{pmatrix} nicht berechnen?

Frage 2: Berechne (1201)(3012)\begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} \cdot \begin{pmatrix} 3 & 0 \\ 1 & 2 \end{pmatrix}.

Frage 3: Eine Matrix hat detA=0\det A = 0. Was bedeutet das für das LGS Ax=bA\vec{x} = \vec{b}?

Frage 4: Welche Matrix beschreibt eine Drehung um 90° gegen den Uhrzeigersinn?

Schlüsselwörter

matrixmatrizenmultiplikationeinheitsmatrixdeterminanteinverse-matrix