A few improvements
This commit is contained in:
@@ -592,16 +592,16 @@ Eine elementweise Multiplikation (\code{.*} Operator, Listing
|
||||
\end{lstlisting}
|
||||
|
||||
\begin{ibox}[t]{\label{matrixmultiplication} Matrixmultiplikation.}
|
||||
Die Matrixmuliplikation definiert wie zwei Matrizen miteinander
|
||||
multipliziert werden. Generell ist die Multiplikation nur dann
|
||||
m\"oglich, wenn die Anzahl Spalten der ersten Matrize gleich der
|
||||
Anzahl Zeilen in der zweiten Matrize ist. Formaler: zwei Matrizen A,
|
||||
B k\"onnen mulipiziert $(A \cdot B)$ werden, wenn A die Gr\"o{\ss}e
|
||||
$(m \times n)$ und B die Gr\"o{\ss}e $(n \times k)$ hat. Die
|
||||
Mulitplikation ist m\"oglich wenn die ``inneren'' Dimensionen $(m
|
||||
\times n) \cdot (n \times k)$ gleich sind. Daraus erkl\"art sich
|
||||
auch die folgende Fehlermeldung in \matlab{}.
|
||||
\begin{lstlisting}
|
||||
Die Matrixmuliplikation aus der linearen Algebra ist nicht eine
|
||||
elementweise Multiplikation. Die Matrixmultiplikation ist nur
|
||||
dann m\"oglich, wenn die Anzahl Spalten der ersten Matrize gleich
|
||||
der Anzahl Zeilen in der zweiten Matrize ist. Formaler: zwei
|
||||
Matrizen A, B k\"onnen mulipiziert $(A \cdot B)$ werden, wenn A die
|
||||
Gr\"o{\ss}e $(m \times n)$ und B die Gr\"o{\ss}e $(n \times k)$
|
||||
hat. Die Mulitplikation ist m\"oglich wenn die ``inneren''
|
||||
Dimensionen $n$ gleich sind. Daraus
|
||||
erkl\"art sich auch die folgende Fehlermeldung in \matlab{}:
|
||||
\begin{lstlisting}[caption={Fehlermeldung bei Matrixmultiplikation}]
|
||||
>> A = [1 2 3; 4 5 6];
|
||||
>> B = [2 4; 6 7];
|
||||
>> A * B
|
||||
@@ -615,20 +615,20 @@ ans =
|
||||
2 2
|
||||
\end{lstlisting}
|
||||
|
||||
Gegeben sind folgende Matrizen:
|
||||
\[A_{(3 \times 2)} = \begin{pmatrix} 1 & 2 \\ 5 & 4 \\ -2 & 3 \end{pmatrix} ,
|
||||
B_{(2 \times 2)} = \begin{pmatrix} -1 & 2 \\ -2 & 5 \end{pmatrix} \]
|
||||
|
||||
Die ``inneren'' Dimensionen der Matrizen stimmen \"uberein ($(3
|
||||
\times 2) \cdot (2 \times 2)$), die Matrixmultiplikation ist
|
||||
m\"oglich. Das Produkt wird aus dem Skalarprodukt
|
||||
jeder Zeile von $A$ mit jeder Spalte aus $B$ berechnet. Nachdem
|
||||
$A$ drei Zeilen und $B$ zwei Spalten hat, hat das Ergebnis von $A
|
||||
\cdot B$ die Gr\"o{\ss}e $(3 \times 2)$.
|
||||
\[A \cdot B = \begin{pmatrix} 1 \cdot -1 + 2 \cdot -2 & 1 \cdot 2 + 2\cdot 5 \\
|
||||
5 \cdot -1 + 4 \cdot -2 & 5 \cdot 2 + 4 \cdot 5\\
|
||||
-2 \cdot -1 + 3 \cdot -2 & -2 \cdot 2 + 3 \cdot 5 \end{pmatrix}
|
||||
= \begin{pmatrix} -5 & 12 \\ -13 & 30 \\ -4 & 11\end{pmatrix}\]
|
||||
Als Beispiel betrachten wir die beiden Matrizen
|
||||
\[A_{(3 \times 2)} = \begin{pmatrix} 1 & 2 \\ 5 & 4 \\ -2 & 3 \end{pmatrix}
|
||||
\quad \text{und} \quad
|
||||
B_{(2 \times 2)} = \begin{pmatrix} -1 & 2 \\ -2 & 5 \end{pmatrix} \; . \]
|
||||
Die ``inneren'' Dimensionen der Matrizen stimmen \"uberein ($(3
|
||||
\times 2) \cdot (2 \times 2)$), die Matrixmultiplikation ist
|
||||
also m\"oglich. Das Produkt wird aus dem Skalarprodukt
|
||||
jeder Zeile von $A$ mit jeder Spalte aus $B$ berechnet. Nachdem
|
||||
$A$ drei Zeilen und $B$ zwei Spalten hat, hat das Ergebnis von $A
|
||||
\cdot B$ die Gr\"o{\ss}e $(3 \times 2)$:
|
||||
\[A \cdot B = \begin{pmatrix} 1 \cdot -1 + 2 \cdot -2 & 1 \cdot 2 + 2\cdot 5 \\
|
||||
5 \cdot -1 + 4 \cdot -2 & 5 \cdot 2 + 4 \cdot 5\\
|
||||
-2 \cdot -1 + 3 \cdot -2 & -2 \cdot 2 + 3 \cdot 5 \end{pmatrix}
|
||||
= \begin{pmatrix} -5 & 12 \\ -13 & 30 \\ -4 & 11\end{pmatrix} \; . \]
|
||||
\end{ibox}
|
||||
|
||||
\section{Boolesche Operationen}
|
||||
|
||||
Reference in New Issue
Block a user