<commit_before>\documentclass{article}
\usepackage{tekvideoexercises}

\begin{document}
\tableofcontents
\newpage

\begin{exercise}{Matrix multiplikation - 1}

Givet matricerne 

\[
A = \left[\begin{array}{rr}
1 & 2 \\ 
3 & 5 
\end{array} \right]
\]

og 

\[
B = \left[\begin{array}{rr}
1 & 3 \\ 
-2 & -4 
\end{array} \right]
\]

Bestem værdien af $C = A \cdot B$.

\begin{answermatrix}
-3 & -5  \\
-7 & -11 
\end{answermatrix}

\hint
Bestem størrelsen af $C$ matricen.

\hint
Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 2} \times 2>$ og $<2 \times {\color{green}2}>$, 
derfor har $C$ matricen størrelsen $<{\color{red} 2} \times {\color{green}2}>$.

\hint
Bestem værdien af $c_{11}$ vha. udtrykket:
\[
c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21}
\]

\hint
\[
c_{11} = 1 \cdot 1 + 2 \cdot (-2) = -3
\]

\hint
Gør det samme for de tre andre værdier i $C$.

\hint
\begin{align*}
c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} \\
& = 3 \cdot 1 + 5 \cdot (-2) \\
& = -7
\end{align*}

\hint
\begin{align*}
c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} \\
& = 1 \cdot 3 + 2 \cdot (-4) \\
& = -5
\end{align*}

\hint
\begin{align*}
c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} \\
& = 3 \cdot 3 + 5 \cdot (-4) \\
& = -11
\end{align*}


\hint
Resultatet er så:
\[
C = \left[\begin{array}{rr}
c_{11} & c_{12} \\
c_{21} & c_{22} 
\end{array} \right] = 
\left[\begin{array}{rr}
-3 & -5 \\
-7 & -11 
\end{array} \right]
\]


\end{exercise}



\newpage

Lav lign opgaver med forskellige matricer.

Benyt gerne matricer med dimensionerne 2x2, 2x3, 3x2 og 3x3.


\end{document}<commit_msg>Opgaver med matrixmultiplikation<commit_after>\documentclass{article}
\usepackage{tekvideoexercises}

\begin{document}
\tableofcontents
\newpage

\begin{exercise}{Matrix multiplikation - 1}

Givet matricerne 

\[
A = \left[\begin{array}{rr}
1 & 2 \\ 
3 & 5 
\end{array} \right]
\]

og 

\[
B = \left[\begin{array}{rr}
1 & 3 \\ 
-2 & -4 
\end{array} \right]
\]

Bestem værdien af $C = A \cdot B$.

\begin{answermatrix}
-3 & -5  \\
-7 & -11 
\end{answermatrix}

\hint
Bestem størrelsen af $C$ matricen.

\hint
Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 2} \times 2>$ og $<2 \times {\color{green}2}>$, 
derfor har $C$ matricen størrelsen $<{\color{red} 2} \times {\color{green}2}>$.

\hint
Bestem værdien af $c_{11}$ vha. udtrykket:
\[
c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21}
\]

\hint
\[
c_{11} = 1 \cdot 1 + 2 \cdot (-2) = -3
\]

\hint
Gør det samme for de tre andre værdier i $C$.

\hint
\begin{align*}
c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} \\
& = 3 \cdot 1 + 5 \cdot (-2) \\
& = -7
\end{align*}

\hint
\begin{align*}
c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} \\
& = 1 \cdot 3 + 2 \cdot (-4) \\
& = -5
\end{align*}

\hint
\begin{align*}
c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} \\
& = 3 \cdot 3 + 5 \cdot (-4) \\
& = -11
\end{align*}


\hint
Resultatet er så:
\[
C = \left[\begin{array}{rr}
c_{11} & c_{12} \\
c_{21} & c_{22} 
\end{array} \right] = 
\left[\begin{array}{rr}
-3 & -5 \\
-7 & -11 
\end{array} \right]
\]


\end{exercise}

\newpage

\begin{exercise}{Matrix multiplikation - 2}
	
	Givet matricerne 
	
	\[
	A = \left[\begin{array}{rr}
	3 & 6 \\ 
	8 & 2 
	\end{array} \right]
	\]
	
	og 
	
	\[
	B = \left[\begin{array}{rr}
	-1 & 2 \\ 
	3 & 2 
	\end{array} \right]
	\]
	
	Bestem værdien af $C = A \cdot B$.
	
	\begin{answermatrix}
		15 & 18  \\
		-2 & 20 
	\end{answermatrix}
	
	\hint
	Bestem størrelsen af $C$ matricen.
	
	\hint
	Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 2} \times 2>$ og $<2 \times {\color{green}2}>$, 
	derfor har $C$ matricen størrelsen $<{\color{red} 2} \times {\color{green}2}>$.
	
	\hint
	Bestem værdien af $c_{11}$ vha. udtrykket:
	\[
	c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21}
	\]
	
	\hint
	\[
	c_{11} = 3 \cdot (-1) + 6 \cdot 3 = 15
	\]
	
	\hint
	Gør det samme for de tre andre værdier i $C$.
	
	\hint
	\begin{align*}
		c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} \\
		& = 8 \cdot (-1) + 2 \cdot 3 \\
		& = -2
	\end{align*}
	
	\hint
	\begin{align*}
		c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} \\
		& = 3 \cdot 2 + 6 \cdot 2 \\
		& = 18
	\end{align*}
	
	\hint
	\begin{align*}
		c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} \\
		& = 8 \cdot 2 + 2 \cdot 2 \\
		& = 20
	\end{align*}
	
	
	\hint
	Resultatet er så:
	\[
	C = \left[\begin{array}{rr}
	c_{11} & c_{12} \\
	c_{21} & c_{22} 
	\end{array} \right] = 
	\left[\begin{array}{rr}
	15 & 18 \\
	-2 & 20 
	\end{array} \right]
	\]
	
	
\end{exercise}

\newpage

\begin{exercise}{Matrix multiplikation - 3}
	
	Givet matricerne 
	
	\[
	A = \left[\begin{array}{rr}
	4 & 3 \\ 
	8 & 9 
	\end{array} \right]
	\]
	
	og 
	
	\[
	B = \left[\begin{array}{rr}
	-2 & -1 \\ 
	4 & 5 
	\end{array} \right]
	\]
	
	Bestem værdien af $C = A \cdot B$.
	
	\begin{answermatrix}
		4 & 11  \\
		20 & 37 
	\end{answermatrix}
	
	\hint
	Bestem størrelsen af $C$ matricen.
	
	\hint
	Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 2} \times 2>$ og $<2 \times {\color{green}2}>$, 
	derfor har $C$ matricen størrelsen $<{\color{red} 2} \times {\color{green}2}>$.
	
	\hint
	Bestem værdien af $c_{11}$ vha. udtrykket:
	\[
	c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21}
	\]
	
	\hint
	\[
	c_{11} = 4 \cdot (-2) + 3 \cdot 4 = 4
	\]
	
	\hint
	Gør det samme for de tre andre værdier i $C$.
	
	\hint
	\begin{align*}
		c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} \\
		& = 8 \cdot (-2) + 9 \cdot 4 \\
		& = 20
	\end{align*}
	
	\hint
	\begin{align*}
		c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} \\
		& = 4 \cdot (-1) + 3 \cdot 5 \\
		& = 11
	\end{align*}
	
	\hint
	\begin{align*}
		c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} \\
		& = 8 \cdot (-1) + 9 \cdot 5 \\
		& = 37
	\end{align*}
	
	
	\hint
	Resultatet er så:
	\[
	C = \left[\begin{array}{rr}
	c_{11} & c_{12} \\
	c_{21} & c_{22} 
	\end{array} \right] = 
	\left[\begin{array}{rr}
	4 & 11 \\
	20 & 37 
	\end{array} \right]
	\]
	
	
\end{exercise}

\newpage

\begin{exercise}{Matrix multiplikation - 4}
	
	Givet matricerne 
	
	\[
	A = \left[\begin{array}{rr}
	-2 & 2 \\ 
	3 & -2 
	\end{array} \right]
	\]
	
	og 
	
	\[
	B = \left[\begin{array}{rr}
	-1 & 3 \\ 
	4 & -5 
	\end{array} \right]
	\]
	
	Bestem værdien af $C = A \cdot B$.
	
	\begin{answermatrix}
		10 & -16  \\
		-11 & 19 
	\end{answermatrix}
	
	\hint
	Bestem størrelsen af $C$ matricen.
	
	\hint
	Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 2} \times 2>$ og $<2 \times {\color{green}2}>$, 
	derfor har $C$ matricen størrelsen $<{\color{red} 2} \times {\color{green}2}>$.
	
	\hint
	Bestem værdien af $c_{11}$ vha. udtrykket:
	\[
	c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21}
	\]
	
	\hint
	\[
	c_{11} = -2 \cdot (-1) + 2 \cdot 4 = 10
	\]
	
	\hint
	Gør det samme for de tre andre værdier i $C$.
	
	\hint
	\begin{align*}
		c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} \\
		& = 3 \cdot (-1) + (-2) \cdot 4 \\
		& = -11
	\end{align*}
	
	\hint
	\begin{align*}
		c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} \\
		& = -2 \cdot 3 + 2 \cdot (-5) \\
		& = -16
	\end{align*}
	
	\hint
	\begin{align*}
		c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} \\
		& = 3 \cdot 3 + (-2) \cdot (-5) \\
		& = 19
	\end{align*}
	
	
	\hint
	Resultatet er så:
	\[
	C = \left[\begin{array}{rr}
	c_{11} & c_{12} \\
	c_{21} & c_{22} 
	\end{array} \right] = 
	\left[\begin{array}{rr}
	10 & -16 \\
	-11 & 19 
	\end{array} \right]
	\]
	
	
\end{exercise}

\newpage

\begin{exercise}{Matrix multiplikation - 5}
	
	Givet matricerne 
	
	\[
	A = \left[\begin{array}{rr}
	2 & 3 \\ 
	4 & 5 \\
	2 & 3 
	\end{array} \right]
	\]
	
	og 
	
	\[
	B = \left[\begin{array}{rrr}
	2 & 3 & 4 \\ 
	5 & 2 & 3 
	\end{array} \right]
	\]
	
	Bestem værdien af $C = A \cdot B$.
	
	\begin{answermatrix}
		19 & 12 & 17  \\
		33 & 22 & 31 \\
		19 & 12 & 17 
	\end{answermatrix}
	
	\hint
	Bestem størrelsen af $C$ matricen.
	
	\hint
	Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 3} \times 2>$ og $<2 \times {\color{green}3}>$, 
	derfor har $C$ matricen størrelsen $<{\color{red} 3} \times {\color{green}3}>$.
	
	\hint
	Bestem værdien af $c_{11}$ vha. udtrykket:
	\[
	c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21}
	\]
	
	\hint
	\[
	c_{11} = 2 \cdot 2 + 3 \cdot 5 = 19
	\]
	
	\hint
	Gør det samme for de 8 andre værdier i $C$.
	
	\hint
	\begin{align*}
		c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} \\
		& = 2 \cdot 3 + 3 \cdot 2 \\
		& = 12
	\end{align*}

	\hint
	\begin{align*}
		c_{13} & = a_{11} \cdot b_{13} + a_{12} \cdot b_{23} \\
	& = 2 \cdot 4 + 3 \cdot 3 \\
	& = 17
	\end{align*}
	
	\hint
	\begin{align*}
		c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} \\
		& = 4 \cdot 2 + 5 \cdot 5 \\
		& = 33
	\end{align*}
	
	\hint
	\begin{align*}
		c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} \\
		& = 4 \cdot 3 + 5 \cdot 2 \\
		& = 22
	\end{align*}
	
	\hint
	\begin{align*}
		c_{23} & = a_{11} \cdot b_{13} + a_{12} \cdot b_{23} \\
	& = 4 \cdot 4 + 5 \cdot 3 \\
	& = 31
	\end{align*}

	\hint
	\begin{align*}
		c_{31} & = a_{31} \cdot b_{11} + a_{32} \cdot b_{21} \\
	& = 2 \cdot 2 + 3 \cdot 5 \\
	& = 19
	\end{align*}	
	
	\hint
	\begin{align*}
		c_{32} & = a_{31} \cdot b_{12} + a_{32} \cdot b_{22} \\
	& = 2 \cdot 3 + 2 \cdot 3 \\
	& = 12
	\end{align*}

	\hint
	\begin{align*}
		c_{33} & = a_{31} \cdot b_{13} + a_{32} \cdot b_{23} \\
	& = 2 \cdot 4 + 3 \cdot 3 \\
	& = 17
	\end{align*}	
	
	
	
	\hint
	Resultatet er så:
	\[
	C = \left[\begin{array}{rrr}
	c_{11} & c_{12} & c_{13} \\
	c_{21} & c_{22} & c_{23} \\
	c_{31} & c_{32} & c_{33}
	\end{array} \right] = 
	\left[\begin{array}{rrr}
	19 & 12 & 17 \\
	33 & 22 & 31 \\
	19 & 12 & 17 \\
	\end{array} \right]
	\]
	
	
\end{exercise}

\newpage

\begin{exercise}{Matrix multiplikation - 6}
	
	Givet matricerne 
	
	\[
	A = \left[\begin{array}{rr}
	2 & 3 \\ 
	-2 & 4 \\
	1 & 5 
	\end{array} \right]
	\]
	
	og 
	
	\[
	B = \left[\begin{array}{rrr}
	3 & 2 & 5 \\ 
	-1 & 3 & 4 
	\end{array} \right]
	\]
	
	Bestem værdien af $C = A \cdot B$.
	
	\begin{answermatrix}
		3 & 13 & 22 \\
		-10 & 8 & 6 \\
		-2 & 17 & 25 
	\end{answermatrix}
	
	\hint
	Bestem størrelsen af $C$ matricen.
	
	\hint
	Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 3} \times 2>$ og $<2 \times {\color{green}3}>$, 
	derfor har $C$ matricen størrelsen $<{\color{red} 3} \times {\color{green}3}>$.
	
	\hint
	Bestem værdien af $c_{11}$ vha. udtrykket:
	\[
	c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21}
	\]
	
	\hint
	\[
	c_{11} = 2 \cdot 3 + 3 \cdot(-1) = 3
	\]
	
	\hint
	Gør det samme for de 8 andre værdier i $C$.
	
	\hint
	\begin{align*}
		c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} \\
		& = 2 \cdot 2 + 3 \cdot 3 \\
		& = 13
	\end{align*}
	
	\hint
	\begin{align*}
		c_{13} & = a_{11} \cdot b_{13} + a_{12} \cdot b_{23} \\
		& = 2 \cdot 5 + 3 \cdot 4 \\
		& = 22
	\end{align*}
	
	\hint
	\begin{align*}
		c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} \\
		& = -2 \cdot 3 + 4 \cdot (-1) \\
		& = -10
	\end{align*}
	
	\hint
	\begin{align*}
		c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} \\
		& = -2 \cdot 2 + 4 \cdot 3 \\
		& = 8
	\end{align*}
	
	\hint
	\begin{align*}
		c_{23} & = a_{11} \cdot b_{13} + a_{12} \cdot b_{23} \\
		& = -2 \cdot 5 + 4 \cdot 4 \\
		& = 6
	\end{align*}
	
	\hint
	\begin{align*}
		c_{31} & = a_{31} \cdot b_{11} + a_{32} \cdot b_{21} \\
		& = 1 \cdot 3 + 5 \cdot (-1) \\
		& = -2
	\end{align*}	
	
	\hint
	\begin{align*}
		c_{32} & = a_{31} \cdot b_{12} + a_{32} \cdot b_{22} \\
		& = 1 \cdot 2 + 5 \cdot 3 \\
		& = 17
	\end{align*}
	
	\hint
	\begin{align*}
		c_{33} & = a_{31} \cdot b_{13} + a_{32} \cdot b_{23} \\
		& = 1 \cdot 5 + 5 \cdot 4 \\
		& = 25
	\end{align*}	
	
	
	
	\hint
	Resultatet er så:
	\[
	C = \left[\begin{array}{rrr}
	c_{11} & c_{12} & c_{13} \\
	c_{21} & c_{22} & c_{23} \\
	c_{31} & c_{32} & c_{33}
	\end{array} \right] = 
	\left[\begin{array}{rrr}
	3 & 13 & 22 \\
	-10 & 8 & 6 \\
	-2 & 17 & 25 \\
	\end{array} \right]
	\]
	
	
\end{exercise}

\newpage

\begin{exercise}{Matrix multiplikation - 7}
	
	Givet matricerne 
	
	\[
	A = \left[\begin{array}{rrr}
	2 & 1 & 4 \\ 
	-2 & 3 & 4 \\
	-1 & 2 & 5  
	\end{array} \right]
	\]
	
	og 
	
	\[
	B = \left[\begin{array}{rrr}
	3 & -2 & 5 \\ 
	-1 & 3 & 4 \\
	2 & 0 & 3
	\end{array} \right]
	\]
	
	Bestem værdien af $C = A \cdot B$.
	
	\begin{answermatrix}
		13 & -1 & 26 \\
		-1 & 13 & 14 \\
		5 & 8 & 18 
	\end{answermatrix}
	
	\hint
	Bestem størrelsen af $C$ matricen.
	
	\hint
	Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 3} \times 3>$ og $<3 \times {\color{green}3}>$, 
	derfor har $C$ matricen størrelsen $<{\color{red} 3} \times {\color{green}3}>$.
	
	\hint
	Bestem værdien af $c_{11}$ vha. udtrykket:
	\[
	c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21} + a_{13} \cdot b_{31}
	\]
	
	\hint
	\[
	c_{11} =  2 \cdot 3 + 1 \cdot (-1) + 4 \cdot 2 = 13
	\]
	
	\hint
	Gør det samme for de 8 andre værdier i $C$.
	
	\hint
	\begin{align*}
		c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} + a_{13} \cdot b_{32}  \\
		& = 2 \cdot (-2) + 1 \cdot 3 + 4 \cdot 0 \\
		& = -1
	\end{align*}
	
	\hint
	\begin{align*}
		c_{13} & = a_{11} \cdot b_{13} + a_{12} \cdot b_{23} + a_{13} \cdot b_{33} \\
		& = 2 \cdot 5 + 1 \cdot 4 + 4 \cdot 3 \\
		& = 26
	\end{align*}
	
	\hint
	\begin{align*}
		c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} + a_{23} \cdot b_{31} \\
		& = -2 \cdot 3 + 3 \cdot (-1) + 4 \cdot 2 \\
		& = -1
	\end{align*}
	
	\hint
	\begin{align*}
		c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} + a_{23} \cdot b_{32}  \\
		& = 2 \cdot 2 + 3 \cdot 3 + 4 \cdot 0 \\
		& = 13
	\end{align*}
	
	\hint
	\begin{align*}
		c_{23} & = a_{11} \cdot b_{13} + a_{12} \cdot b_{23} + a_{23} \cdot b_{33}   \\
		& = -2 \cdot 5 + 3 \cdot 4 + 4 \cdot 3\\
		& = 14
	\end{align*}
	
	\hint
	\begin{align*}
		c_{31} & = a_{31} \cdot b_{11} + a_{32} \cdot b_{21} + a_{33} \cdot b_{31} \\
		& = -1 \cdot 3 + 2 \cdot (-1) + 5 \cdot 2 \\
		& = 5
	\end{align*}	
	
	\hint
	\begin{align*}
		c_{32} & = a_{31} \cdot b_{12} + a_{32} \cdot b_{22} + a_{33} \cdot b_{32}  \\
		& = -1 \cdot (-2) + 2 \cdot 3 + 5 \cdot 0 \\
		& = 8
	\end{align*}
	
	\hint
	\begin{align*}
		c_{33} & = a_{31} \cdot b_{13} + a_{32} \cdot b_{23} + a_{33} \cdot b_{33} \\
		& = -1 \cdot 5 + 2 \cdot 4 + 5 \cdot 3\\
		& = 18
	\end{align*}	
	
	
	
	\hint
	Resultatet er så:
	\[
	C = \left[\begin{array}{rrr}
	c_{11} & c_{12} & c_{13} \\
	c_{21} & c_{22} & c_{23} \\
	c_{31} & c_{32} & c_{33}
	\end{array} \right] = 
	\left[\begin{array}{rrr}
	13 & -1 & 26 \\
	-1 & 13 & 14 \\
	5 & 8 & 18 \\
	\end{array} \right]
	\]
	
	
\end{exercise}

\newpage

\begin{exercise}{Matrix multiplikation - 8}
	
	Givet matricerne 
	
	\[
	A = \left[\begin{array}{rrr}
	-2 & 8 & -1 \\ 
	0 & 2 & 3 \\
	5 & 0 & -4  
	\end{array} \right]
	\]
	
	og 
	
	\[
	B = \left[\begin{array}{rrr}
	1 & 3 & 2 \\ 
	4 & -2 & 3 \\
	-1 & 0 & 4
	\end{array} \right]
	\]
	
	Bestem værdien af $C = A \cdot B$.
	
	\begin{answermatrix}
		31 & -22 & 16 \\
		5 & -4 & 18 \\
		9 & 15 & -6 
	\end{answermatrix}
	
	\hint
	Bestem størrelsen af $C$ matricen.
	
	\hint
	Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 3} \times 3>$ og $<3 \times {\color{green}3}>$, 
	derfor har $C$ matricen størrelsen $<{\color{red} 3} \times {\color{green}3}>$.
	
	\hint
	Bestem værdien af $c_{11}$ vha. udtrykket:
	\[
	c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21} + a_{13} \cdot b_{31}
	\]
	
	\hint
	\[
	c_{11} =  -2 \cdot 1 + 8 \cdot 4 + (-1) \cdot (-1) = 31
	\]
	
	\hint
	Gør det samme for de 8 andre værdier i $C$.
	
	\hint
	\begin{align*}
		c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} + a_{13} \cdot b_{32}  \\
		& = -2 \cdot 3 + 8 \cdot (-2) + (-1) \cdot 0 \\
		& = -22
	\end{align*}
	
	\hint
	\begin{align*}
		c_{13} & = a_{11} \cdot b_{13} + a_{12} \cdot b_{23} + a_{13} \cdot b_{33} \\
		& = -2 \cdot 2 + 8 \cdot 3 + (-1) \cdot 4 \\
		& = 16
	\end{align*}
	
	\hint
	\begin{align*}
		c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} + a_{23} \cdot b_{31} \\
		& = 0 \cdot 1 + 2 \cdot 4 + 3 \cdot (-1) \\
		& =5
	\end{align*}
	
	\hint
	\begin{align*}
		c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} + a_{23} \cdot b_{32}  \\
		& = 0 \cdot 3 + 2 \cdot (-2) + 3 \cdot 0 \\
		& = -4
	\end{align*}
	
	\hint
	\begin{align*}
		c_{23} & = a_{11} \cdot b_{13} + a_{12} \cdot b_{23} + a_{23} \cdot b_{33}   \\
		& = 0 \cdot 2 + 2 \cdot 3 + 3 \cdot 4\\
		& = 18
	\end{align*}
	
	\hint
	\begin{align*}
		c_{31} & = a_{31} \cdot b_{11} + a_{32} \cdot b_{21} + a_{33} \cdot b_{31} \\
		& = 5 \cdot 1 + 4 \cdot 0 + 1 \cdot 4 \\
		& = 9
	\end{align*}	
	
	\hint
	\begin{align*}
		c_{32} & = a_{31} \cdot b_{12} + a_{32} \cdot b_{22} + a_{33} \cdot b_{32}  \\
		& = 5 \cdot 3 + 0 \cdot 2 + (-4) \cdot 0\\
		& = 15
	\end{align*}
	
	\hint
	\begin{align*}
		c_{33} & = a_{31} \cdot b_{13} + a_{32} \cdot b_{23} + a_{33} \cdot b_{33} \\
		& = 5 \cdot 2 + 0 \cdot 3 + (-4) \cdot 4\\
		& = -6
	\end{align*}	
	
	
	
	\hint
	Resultatet er så:
	\[
	C = \left[\begin{array}{rrr}
	c_{11} & c_{12} & c_{13} \\
	c_{21} & c_{22} & c_{23} \\
	c_{31} & c_{32} & c_{33}
	\end{array} \right] = 
	\left[\begin{array}{rrr}
	31 & -22 & 16 \\
	5 & -4 & 18 \\
	9 & 15 & -6 \\
	\end{array} \right]
	\]
	
	
\end{exercise}

\newpage

\begin{exercise}{Matrix multiplikation - 9}
	
	Givet matricerne 
	
	\[
	A = \left[\begin{array}{rrr}
	3 & 4 & 7 \\ 
	-2 & 5 & 1
	\end{array} \right]
	\]
	
	og 
	
	\[
	B = \left[\begin{array}{rr}
	4 & 6 \\ 
	2 & 3 \\
	-1 & 2 
	\end{array} \right]
	\]
	
	Bestem værdien af $C = A \cdot B$.
	
	\begin{answermatrix}
		13 & 44  \\
		1 & 5 
	\end{answermatrix}
	
	\hint
	Bestem størrelsen af $C$ matricen.
	
	\hint
	Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 2} \times 3>$ og $<3 \times {\color{green}2}>$, 
	derfor har $C$ matricen størrelsen $<{\color{red} 2} \times {\color{green}2}>$.
	
	\hint
	Bestem værdien af $c_{11}$ vha. udtrykket:
	\[
	c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21} + a_{13} \cdot b_{31}
	\]
	
	\hint
	\[
	c_{11} = 3 \cdot 4 + 4 \cdot 2 + 7 \cdot (-1) = 13
	\]
	
	\hint
	Gør det samme for de tre andre værdier i $C$.
	
	\hint
	\begin{align*}
		c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} + a_{23} \cdot b_{31}   \\
		& = -2 \cdot 4 + 5 \cdot 2 + 1 \cdot (-1) \\
		& = 1
	\end{align*}
	
	\hint
	\begin{align*}
		c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} + a_{13} \cdot b_{32}  \\
		& = 3 \cdot 6 + 4 \cdot 3 + 7 \cdot 2 \\
		& = 44
	\end{align*}
	
	\hint
	\begin{align*}
		c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} + a_{23} \cdot b_{32}\\
		& = -2 \cdot 6 + 5 \cdot 3 + 1 \cdot 2 \\
		& = 5
	\end{align*}
	
	
	\hint
	Resultatet er så:
	\[
	C = \left[\begin{array}{rr}
	c_{11} & c_{12} \\
	c_{21} & c_{22} 
	\end{array} \right] = 
	\left[\begin{array}{rr}
	13 & 44 \\
	1 & 5 
	\end{array} \right]
	\]
	
	
\end{exercise}

\newpage

\begin{exercise}{Matrix multiplikation - 10}
	
	Givet matricerne 
	
	\[
	A = \left[\begin{array}{rrr}
	-2 & 4 & -5 \\ 
	7 & -3 & 6
	\end{array} \right]
	\]
	
	og 
	
	\[
	B = \left[\begin{array}{rr}
	5 & 1 \\ 
	-2 & 3 \\
	7 & 8 
	\end{array} \right]
	\]
	
	Bestem værdien af $C = A \cdot B$.
	
	\begin{answermatrix}
		-53 & -30  \\
		83 & 46 
	\end{answermatrix}
	
	\hint
	Bestem størrelsen af $C$ matricen.
	
	\hint
	Størrelsen af $A$ og $B$ matricerne er $<{\color{red} 2} \times 3>$ og $<3 \times {\color{green}2}>$, 
	derfor har $C$ matricen størrelsen $<{\color{red} 2} \times {\color{green}2}>$.
	
	\hint
	Bestem værdien af $c_{11}$ vha. udtrykket:
	\[
	c_{11} = a_{11} \cdot b_{11} + a_{12} \cdot b_{21} + a_{13} \cdot b_{31}
	\]
	
	\hint
	\[
	c_{11} = -2 \cdot 5 + 4 \cdot (-2) + (-5) \cdot 7 = -53
	\]
	
	\hint
	Gør det samme for de tre andre værdier i $C$.
	
	\hint
	\begin{align*}
		c_{21} & = a_{21} \cdot b_{11} + a_{22} \cdot b_{21} + a_{23} \cdot b_{31}   \\
		& = -2 \cdot 1 + 4 \cdot 3 + (-5) \cdot 8 \\
		& = -30
	\end{align*}
	
	\hint
	\begin{align*}
		c_{12} & = a_{11} \cdot b_{12} + a_{12} \cdot b_{22} + a_{13} \cdot b_{32}  \\
		& = 7 \cdot 5 + (-3) \cdot (-2) + 6 \cdot 7 \\
		& = 83
	\end{align*}
	
	\hint
	\begin{align*}
		c_{22} & = a_{21} \cdot b_{12} + a_{22} \cdot b_{22} + a_{23} \cdot b_{32}\\
		& = 7 \cdot 1 + (-3) \cdot 3 + 6 \cdot 8 \\
		& = 46
	\end{align*}
	
	
	\hint
	Resultatet er så:
	\[
	C = \left[\begin{array}{rr}
	c_{11} & c_{12} \\
	c_{21} & c_{22} 
	\end{array} \right] = 
	\left[\begin{array}{rr}
	-53 & -30 \\
	83 & 46 
	\end{array} \right]
	\]
	
	
\end{exercise}


\newpage

%Lav lign opgaver med forskellige matricer.

%Benyt gerne matricer med dimensionerne 2x2, 2x3, 3x2 og 3x3.


\end{document}
{'fraction_non_alphanumeric': 0.23166869671132764, 'fraction_numerical': 0.08594397076735688, 'mean_word_length': 2.0982641509433964, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6258087', 'n_tokens_mistral': 11589, 'n_tokens_neox': 9832, 'n_words': 2528}