Matrix

Aus FLBK-Wiki
Zur Navigation springen Zur Suche springen

Eine Matrix ist eine rechteckige Anordnung von Zahlen oder Symbolen, die in Zeilen und Spalten organisiert ist. Matrizen dienen zur Darstellung und Berechnung linearer Zusammenhänge und werden in vielen Bereichen wie Wirtschaft, Technik, Informatik und Naturwissenschaften eingesetzt. Matrizen werden häufig mit Gozintographen graphisch dargestellt.

Definition

Eine rechteckige Anordnung von Zahlen oder Platzhaltern mit \(m \in \mathbb{N}\) Zeilen und \(n \in \mathbb{N}\) Spalten wird als \(m \times n\)-Matrix bezeichnet. \(a_{ij} \in \mathbb{R}\) ist das Element in Zeile \(i\) und Spalte \(j\).

[math]\displaystyle{ A = \begin{pmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \dots & a_{mn} \end{pmatrix} }[/math]

\(m \times n\) ist das Format oder die Dimension einer Matrix. Eine \(n \times n\)-Matrix heißt quadratische Matrix. Die Elemente \(a_{11},...,a_{mn}\) bilden die Hauptdiagonale der Matrix. Eine quadratische Matrix, deren Elemente auf der Hauptdiagonalen den Wert 1 haben, heißt Einheitsmatrix. Eine Matrix die nur aus einer Spalte besteht, heißt Spaltenvektor. Eine Matrix die nur aus einer Zeile besteht, heißt Zeilenvektor.

Transponierte Matrix

Es sei

[math]\displaystyle{ A = \begin{pmatrix} a_{11} & a_{12} & \dots & a_{1n} \\ a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \dots & a_{mn} \end{pmatrix} }[/math]

eine \(m \times n\)-Matrix. Die transponierte Matrix \(A^T\) entsteht, indem man Zeilen und Spalten vertauscht. Es gilt

[math]\displaystyle{ A^T = \begin{pmatrix} a_{11} & a_{21} & \dots & a_{m1} \\ a_{12} & a_{22} & \dots & a_{m2} \\ \vdots & \vdots & \ddots & \vdots \\ a_{1n} & a_{2n} & \dots & a_{mn} \end{pmatrix} }[/math]

Addition

Es seien A und B \(m \times n\)-Matrizen, dann gilt

[math]\displaystyle{ A + B = \begin{pmatrix} a_{11}+b_{11} & a_{12}+b_{12} & \dots & a_{1n}+b_{1n} \\ a_{21}+b_{21} & a_{22}+b_{22} & \dots & a_{2n}+b_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1}+b_{m1} & a_{m2}+b_{m2} & \dots & a_{mn}+b_{mn} \end{pmatrix} }[/math]

Subtraktion

Es seien A und B \(m \times n\)-Matrizen, dann gilt

[math]\displaystyle{ A - B = \begin{pmatrix} a_{11}-b_{11} & a_{12}-b_{12} & \dots & a_{1n}-b_{1n} \\ a_{21}-b_{21} & a_{22}-b_{22} & \dots & a_{2n}-b_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1}-b_{m1} & a_{m2}-b_{m2} & \dots & a_{mn}-b_{mn} \end{pmatrix} }[/math]

Skalarmultiplikation

Es seien A eine \(m \times n\)-Matrix und \(\lambda \in \mathbb{R}\) ein Skalar, dann gilt

[math]\displaystyle{ \lambda \cdot A = \begin{pmatrix} \lambda \cdot a_{11} & \lambda \cdot a_{12} & \dots & \lambda \cdot a_{1n} \\ \lambda \cdot a_{21} & \lambda \cdot a_{22} & \dots & \lambda \cdot a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ \lambda \cdot a_{m1} & \lambda \cdot a_{m2} & \dots & \lambda \cdot a_{mn} \end{pmatrix} }[/math]

Skalarprodukt

Gegeben seien ein Zeilenvektor [math]\displaystyle{ a \in \mathbb{R}^n }[/math] und Spaltenvektor [math]\displaystyle{ b \in \mathbb{R}^n }[/math], dann ist das Skalarprodukt durch

[math]\displaystyle{ a\cdot b=\begin{pmatrix} a_{1} & a_{2} & \dots & a_{n} \end{pmatrix} \cdot \begin{pmatrix} b_{1} \\ b_{2} \\ \dots \\ b_{n} \end{pmatrix} = a_1 \cdot b_1 + a_2 \cdot b_2 +... + a_n \cdot b_n }[/math]

definiert.

Multiplikation

Es seien A eine \(m \times r\)-Matrix und B eine \(r \times n\)-Matrix, dann gilt wird das Produkt \(A \cdot B \) berechnet, indem das Skalarprodukt aus jedem Zeilenvektor von \(A\) mit jedem Spaltenvektor von \(B\) gebildet wird. Das Ergebnis ist eine \(m \times n\)-Matrix.

Beispiele

Aufstellen einer Transportmatrix und einer Kostenmatrix

Ein Unternehmen betreibt drei Steinbrüche und zwei Betonwerke. In den Betonwerken wird der Kies aus den Steinbrüchen zu Beton verarbeitet. Für den Monat Februar sind diese Transporte in der nachfolgenden Tabelle dargestellt. Beispielsweise werden 150 t Kies im Februar von Steinbruch 2 nach Betonwerk 1 transportiert.

Transport B1 B2
S1 100 200
S2 150 300
S3 90 110

Die Transportkosten in € pro Tonne Kies sind in der folgenden Tabelle aufgelistet.

Kosten B1 B2
S1 0,5 2
S2 0,3 1
S3 0,4 0,25

Daraus ergibt sich die Transportmatrix

[math]\displaystyle{ T = \begin{pmatrix} 100 & 200 \\ 150 & 300 \\ 90 & 100 \\ \end{pmatrix} }[/math]

sowie die Kostenmatrix

[math]\displaystyle{ K = \begin{pmatrix} 0,5 & 2 \\ 0,3 & 1 \\ 0,4 & 0,25 \\ \end{pmatrix} }[/math]

Aufstellen von Herstellungsmatrizen

Ein Unternehmen stellt aus den Rohstoffen R1 und R2 die Zwischenprodukte Z1, Z2 und Z3 her. Aus diesen Zwischenprodukten werden die Endprodukte E1 und E2 ermittelt. Die benötigten Mengen in t werden in den folgenden Stücklisten zusammengefasst. Beispielsweise werden für die Herstellung von 1t Z1 insgesamt 3t R1 und 5t R2 benötigt. Für die Herstellung von 1t E1 werden 1t Z1, 2t Z2 und 1t Z3 benötigt.

Stückliste 1 Z1 Z2 Z3
R1 3 2 4
R2 5 1 3
Stückliste 2 E1 E2
Z1 1 3
Z2 2 4
Z3 1 2

Damit ergeben sich die Herstellungsmatrix für die Zwischenprodukte [math]\displaystyle{ RZ = \begin{pmatrix} 3 & 2 & 4 \\ 5 & 1 & 3 \end{pmatrix} }[/math] sowie die Herstellungsmatrix für die Endprodukte [math]\displaystyle{ ZE = \begin{pmatrix} 1 & 3 \\ 2 & 4 \\ 1 & 2 \end{pmatrix} }[/math]

Transponierte Matrix berechnen

Gegeben sei die Matrix [math]\displaystyle{ A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{pmatrix} }[/math]

Die transponierte Matrix ist dann [math]\displaystyle{ A^T = \begin{pmatrix} 1 & 4 & 7 \\ 2 & 5 & 8 \\ 3 & 6 & 9 \end{pmatrix} }[/math]

Addition und Subtraktion von Matrizen

Zwei Matrizen werden addiert bzw. subtrahiert, indem man ihre entsprechenden Elemente addiert bzw. subtrahiert. Die Matrizen müssen die gleiche Dimension haben.

Gegeben seien [math]\displaystyle{ A = \begin{pmatrix} 1 & 3 \\ 2 & 4 \end{pmatrix}, \quad B = \begin{pmatrix} 5 & 2 \\ 1 & 3 \end{pmatrix} }[/math] dann wird die Summe durch [math]\displaystyle{ A + B = \begin{pmatrix} 1+5 & 3+2 \\ 2+1 & 4+3 \end{pmatrix} = \begin{pmatrix} 6 & 5 \\ 3 & 7 \end{pmatrix} }[/math] berechnet.

Gegeben seien [math]\displaystyle{ C = \begin{pmatrix} 7 & 4 \\ 6 & 2 \end{pmatrix}, \quad D = \begin{pmatrix} 3 & 1 \\ 2 & 5 \end{pmatrix} }[/math] dann wird die Differenz von C und D durch [math]\displaystyle{ C - D = \begin{pmatrix} 7-3 & 4-1 \\ 6-2 & 2-5 \end{pmatrix} = \begin{pmatrix} 4 & 3 \\ 4 & -3 \end{pmatrix} }[/math] berechnet.

Skalarmultiplikation durchführen

Gegeben sei die Matrix [math]\displaystyle{ B = \begin{pmatrix} 2 & 4 & 1 \\ 0 & 3 & 5 \\ 7 & 1 & 6 \end{pmatrix} }[/math] und der Skalar [math]\displaystyle{ \lambda = 3 }[/math]

Die skalare Multiplikation ergibt [math]\displaystyle{ 3 \cdot B = \begin{pmatrix} 3 \cdot 2 & 3 \cdot 4 & 3 \cdot 1 \\ 3 \cdot 0 & 3 \cdot 3 & 3 \cdot 5 \\ 3 \cdot 7 & 3 \cdot 1 & 3 \cdot 6 \end{pmatrix} = \begin{pmatrix} 6 & 12 & 3 \\ 0 & 9 & 15 \\ 21 & 3 & 18 \end{pmatrix} }[/math]

Das Skalarprodukt berechnen

Der Zeilenvektor a und der Spaltenvektor b seien wie folgt gegeben: [math]\displaystyle{ a = \begin{pmatrix} 2 & -1 & 3 \end{pmatrix}, \quad b = \begin{pmatrix} 4 \\ 2 \\ 1 \end{pmatrix} }[/math] Das Skalarprodukt wird dann durch [math]\displaystyle{ a \cdot b = (2 \cdot 4) + (-1 \cdot 2) + (3 \cdot 1) = 8 - 2 + 3 = 9 }[/math] berechnet.

Multiplikation von Matrizen

Gegeben seien die Matrizen [math]\displaystyle{ E = \begin{pmatrix} 1 & 2 \\ 3 & 4 \end{pmatrix}, \quad F = \begin{pmatrix} 2 & 0 \\ 1 & 3 \end{pmatrix} }[/math], dann werden diese durch [math]\displaystyle{ E \cdot F = \begin{pmatrix} 1\cdot2 + 2\cdot1 & 1\cdot0 + 2\cdot3 \\ 3\cdot2 + 4\cdot1 & 3\cdot0 + 4\cdot3 \end{pmatrix} = \begin{pmatrix} 4 & 6 \\ 10 & 12 \end{pmatrix} }[/math] miteinander multipliziert. Die Multiplikation ist nicht kommutativ, d. h. in der Regel gilt [math]\displaystyle{ E \cdot F \neq F \cdot E }[/math].

[math]\displaystyle{ G = \begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix}, \quad H = \begin{pmatrix} 1 & 4 \\ 2 & 1 \end{pmatrix}, \quad \lambda = 2 }[/math]

[math]\displaystyle{ \lambda \cdot (G + H) = 2 \cdot \left( \begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix} + \begin{pmatrix} 1 & 4 \\ 2 & 1 \end{pmatrix} \right) }[/math]

[math]\displaystyle{ = 2 \cdot \begin{pmatrix} 3 & 5 \\ 2 & 4 \end{pmatrix} = \begin{pmatrix} 6 & 10 \\ 4 & 8 \end{pmatrix} }[/math]

Skalarmultiplikation, Addition sowie Multiplikation kombinieren

Das folgende Beispiel zeigt, wie die Rechenoperationen kombiniert werden können.

[math]\displaystyle{ G = \begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix}, \quad H = \begin{pmatrix} 1 & 4 \\ 2 & 1 \end{pmatrix}, \quad J = \begin{pmatrix} 3 & 1 \\ 2 & 2 \end{pmatrix}, \quad \lambda = 2, \quad \mu = 3 }[/math]

Berechnung von: [math]\displaystyle{ \lambda \cdot G + \mu \cdot (H \cdot J) }[/math]

[math]\displaystyle{ = 2 \cdot \begin{pmatrix} 2 & 1 \\ 0 & 3 \end{pmatrix} + 3 \cdot \left( \begin{pmatrix} 1 & 4 \\ 2 & 1 \end{pmatrix} \cdot \begin{pmatrix} 3 & 1 \\ 2 & 2 \end{pmatrix} \right) }[/math]

Zuerst Matrixmultiplikation: [math]\displaystyle{ H \cdot J = \begin{pmatrix} 1\cdot3 + 4\cdot2 & 1\cdot1 + 4\cdot2 \\ 2\cdot3 + 1\cdot2 & 2\cdot1 + 1\cdot2 \end{pmatrix} = \begin{pmatrix} 3 + 8 & 1 + 8 \\ 6 + 2 & 2 + 2 \end{pmatrix} = \begin{pmatrix} 11 & 9 \\ 8 & 4 \end{pmatrix} }[/math]

Dann Skalarmultiplikationen: [math]\displaystyle{ 2 \cdot G = \begin{pmatrix} 4 & 2 \\ 0 & 6 \end{pmatrix}, \quad 3 \cdot (H \cdot J) = \begin{pmatrix} 33 & 27 \\ 24 & 12 \end{pmatrix} }[/math]

Schließlich Addition: [math]\displaystyle{ \begin{pmatrix} 4 & 2 \\ 0 & 6 \end{pmatrix} + \begin{pmatrix} 33 & 27 \\ 24 & 12 \end{pmatrix} = \begin{pmatrix} 4+33 & 2+27 \\ 0+24 & 6+12 \end{pmatrix} = \begin{pmatrix} 37 & 29 \\ 24 & 18 \end{pmatrix} }[/math]

Endergebnis: [math]\displaystyle{ \lambda \cdot G + \mu \cdot (H \cdot J) = \begin{pmatrix} 37 & 29 \\ 24 & 18 \end{pmatrix} }[/math]