Cvičný test 4
Otázka 1 — Slovní úloha (3 body)
V dopravní síti se ze tří skladů ($S_1, S_2, S_3$) zásobují dva obchody ($O_1, O_2$). Sklad $S_1$ odešle celkem 50 jednotek, sklad $S_2$ odešle 30 jednotek a sklad $S_3$ odešle 20 jednotek. Obchod $O_1$ přijme celkem 60 jednotek a obchod $O_2$ přijme 40 jednotek.
Označme $x_{ij}$ množství odeslaných jednotek ze skladu $S_i$ do obchodu $O_j$. Sestavte soustavu rovnic a najděte všechna řešení, víte-li že $x_{11} = 25$.
Proměnné: $x_{11}, x_{12}, x_{21}, x_{22}, x_{31}, x_{32}$.
Podmínky pro sklady (odesláno):
$$\begin{aligned} x_{11} + x_{12} &= 50 \\ x_{21} + x_{22} &= 30 \\ x_{31} + x_{32} &= 20 \end{aligned}$$Podmínky pro obchody (přijato):
$$\begin{aligned} x_{11} + x_{21} + x_{31} &= 60 \\ x_{12} + x_{22} + x_{32} &= 40 \end{aligned}$$Z 1. rovnice: $x_{12} = 50 - 25 = 25$
Z 4. rovnice: $x_{21} + x_{31} = 60 - 25 = 35$
Z 5. rovnice: $x_{22} + x_{32} = 40 - 25 = 15$
Z 2. rovnice: $x_{22} = 30 - x_{21}$
Z 3. rovnice: $x_{32} = 20 - x_{31}$
Dosadíme do $x_{22} + x_{32} = 15$:
$$(30 - x_{21}) + (20 - x_{31}) = 15 \Rightarrow x_{21} + x_{31} = 35$$To je totožné s podmínkou z 4. rovnice — máme volnou proměnnou.
Položme $x_{21} = t$, kde $0 \le t \le 30$ (nezápornost). Pak:
$$x_{31} = 35 - t, \quad x_{22} = 30 - t, \quad x_{32} = t - 15$$Z podmínky nezápornosti $x_{32} \ge 0$: $t \ge 15$. Z $x_{31} \ge 0$: $t \le 35$, ale $t \le 30$.
Pro $t \in \{15, 16, \ldots, 30\}$ (nebo $t \in [15, 30]$ pro spojitý případ):
$$x_{11} = 25, \; x_{12} = 25, \; x_{21} = t, \; x_{22} = 30-t, \; x_{31} = 35-t, \; x_{32} = t-15$$Otázka 2 — Souřadnice a matice přechodu (3 body)
V $\mathbb{R}^3$ je dána báze $N = \left\{\begin{pmatrix}1\\1\\0\end{pmatrix}, \begin{pmatrix}0\\1\\1\end{pmatrix}, \begin{pmatrix}1\\0\\1\end{pmatrix}\right\}$.
a) Najděte matici přechodu od standardní báze $S$ k bázi $N$.
b) Najděte souřadnice vektoru $\vec{v} = (3, 2, 1)^T$ v bázi $N$.
Matice přechodu od $S$ k $N$ je $\mathbf{P} = \mathbf{Q}^{-1}$, kde $\mathbf{Q}$ je matice přechodu od $N$ k $S$. Sloupce $\mathbf{Q}$ jsou vektory báze $N$ zapsané v $S$:
$$\mathbf{Q} = \begin{pmatrix} 1 & 0 & 1 \\ 1 & 1 & 0 \\ 0 & 1 & 1 \end{pmatrix}$$Najdeme $\mathbf{Q}^{-1}$ pomocí GEM na $(\mathbf{Q}|\mathbf{E})$:
$$\left(\begin{array}{ccc|ccc} 1 & 0 & 1 & 1 & 0 & 0 \\ 1 & 1 & 0 & 0 & 1 & 0 \\ 0 & 1 & 1 & 0 & 0 & 1 \end{array}\right)$$$R_2 \leftarrow R_2 - R_1$:
$$\left(\begin{array}{ccc|ccc} 1 & 0 & 1 & 1 & 0 & 0 \\ 0 & 1 & -1 & -1 & 1 & 0 \\ 0 & 1 & 1 & 0 & 0 & 1 \end{array}\right)$$$R_3 \leftarrow R_3 - R_2$:
$$\left(\begin{array}{ccc|ccc} 1 & 0 & 1 & 1 & 0 & 0 \\ 0 & 1 & -1 & -1 & 1 & 0 \\ 0 & 0 & 2 & 1 & -1 & 1 \end{array}\right)$$$R_3 \leftarrow \frac{1}{2}R_3$, pak $R_1 \leftarrow R_1 - R_3$, $R_2 \leftarrow R_2 + R_3$:
$$\left(\begin{array}{ccc|ccc} 1 & 0 & 0 & \frac{1}{2} & \frac{1}{2} & -\frac{1}{2} \\ 0 & 1 & 0 & -\frac{1}{2} & \frac{1}{2} & \frac{1}{2} \\ 0 & 0 & 1 & \frac{1}{2} & -\frac{1}{2} & \frac{1}{2} \end{array}\right)$$Matice přechodu od $S$ k $N$:
$$\mathbf{P} = \mathbf{Q}^{-1} = \frac{1}{2}\begin{pmatrix} 1 & 1 & -1 \\ -1 & 1 & 1 \\ 1 & -1 & 1 \end{pmatrix}$$Ověření: $2 \cdot (1,1,0)^T + 0 \cdot (0,1,1)^T + 1 \cdot (1,0,1)^T = (2+0+1, 2+0+0, 0+0+1)^T = (3, 2, 1)^T$.
a) $\mathbf{P} = \frac{1}{2}\begin{pmatrix} 1 & 1 & -1 \\ -1 & 1 & 1 \\ 1 & -1 & 1 \end{pmatrix}$
b) $\langle\vec{v}\rangle_N = (2, 0, 1)^T$
Otázka 3 — Vlastnosti determinantů (3 body)
Nechť $\mathbf{A}$ je matice $3 \times 3$ a $\det(\mathbf{A}) = 4$. Určete:
a) $\det(2\mathbf{A})$
b) $\det(\mathbf{A}^T)$
c) $\det(\mathbf{A}^{-1})$
d) $\det(\mathbf{A}^2)$
e) $\det(-\mathbf{A})$
Připomeneme klíčové vlastnosti pro matici $n \times n$:
- $\det(c\mathbf{A}) = c^n \det(\mathbf{A})$
- $\det(\mathbf{A}^T) = \det(\mathbf{A})$
- $\det(\mathbf{A}^{-1}) = \frac{1}{\det(\mathbf{A})}$
- $\det(\mathbf{A}\mathbf{B}) = \det(\mathbf{A}) \cdot \det(\mathbf{B})$
a) $\det(2\mathbf{A}) = 2^3 \cdot \det(\mathbf{A}) = 8 \cdot 4 = 32$
b) $\det(\mathbf{A}^T) = \det(\mathbf{A}) = 4$
c) $\det(\mathbf{A}^{-1}) = \frac{1}{\det(\mathbf{A})} = \frac{1}{4}$
d) $\det(\mathbf{A}^2) = (\det(\mathbf{A}))^2 = 16$
e) $\det(-\mathbf{A}) = (-1)^3 \cdot \det(\mathbf{A}) = -4$
a) $\det(2\mathbf{A}) = 32$, b) $\det(\mathbf{A}^T) = 4$, c) $\det(\mathbf{A}^{-1}) = \frac{1}{4}$, d) $\det(\mathbf{A}^2) = 16$, e) $\det(-\mathbf{A}) = -4$
Otázka 4 — Inverzní lineární zobrazení (5 bodů)
Lineární zobrazení $f: \mathbb{R}^2 \to \mathbb{R}^2$ je dáno maticí ve standardní bázi:
$$\mathbf{M} = \begin{pmatrix} 3 & 1 \\ 2 & 1 \end{pmatrix}$$a) Ukažte, že $f$ je bijektivní.
b) Najděte matici inverzního zobrazení $f^{-1}$.
c) Ověřte, že $(f^{-1} \circ f)(2, -1)^T = (2, -1)^T$.
$\det(\mathbf{M}) = 3 \cdot 1 - 1 \cdot 2 = 1 \neq 0$
Matice je regulární, tedy zobrazení $f$ je bijektivní (prosté i „na").
Pro matici $2 \times 2$: pokud $\mathbf{M} = \begin{pmatrix} a & b \\ c & d \end{pmatrix}$, pak $\mathbf{M}^{-1} = \frac{1}{ad-bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}$.
$$\mathbf{M}^{-1} = \frac{1}{1}\begin{pmatrix} 1 & -1 \\ -2 & 3 \end{pmatrix} = \begin{pmatrix} 1 & -1 \\ -2 & 3 \end{pmatrix}$$Nejprve $f(2, -1)^T$:
$$f(2, -1)^T = \begin{pmatrix} 3 & 1 \\ 2 & 1 \end{pmatrix}\begin{pmatrix} 2 \\ -1 \end{pmatrix} = \begin{pmatrix} 5 \\ 3 \end{pmatrix}$$Pak $f^{-1}(5, 3)^T$:
$$f^{-1}(5, 3)^T = \begin{pmatrix} 1 & -1 \\ -2 & 3 \end{pmatrix}\begin{pmatrix} 5 \\ 3 \end{pmatrix} = \begin{pmatrix} 2 \\ -1 \end{pmatrix}$$Skutečně $(f^{-1} \circ f)(2, -1)^T = (2, -1)^T$.
a) $\det(\mathbf{M}) = 1 \neq 0$, tedy $f$ je bijektivní.
b) $\mathbf{M}^{-1} = \begin{pmatrix} 1 & -1 \\ -2 & 3 \end{pmatrix}$
c) $(f^{-1} \circ f)(2,-1)^T = (2,-1)^T$ — ověřeno.
Otázka 5 — Maticová aritmetika (3 body)
Jsou dány matice:
$$\mathbf{A} = \begin{pmatrix} 1 & 2 \\ 3 & 0 \\ -1 & 4 \end{pmatrix}, \qquad \mathbf{B} = \begin{pmatrix} 2 & -1 & 3 \\ 0 & 1 & 2 \end{pmatrix}$$Spočítejte $2\mathbf{A}^T\mathbf{A} - 3\mathbf{B}\mathbf{A}$.
$\mathbf{A}$ je $3 \times 2$, $\mathbf{A}^T$ je $2 \times 3$, $\mathbf{B}$ je $2 \times 3$.
$\mathbf{A}^T\mathbf{A}$: $(2 \times 3)(3 \times 2) = 2 \times 2$ — OK.
$\mathbf{B}\mathbf{A}$: $(2 \times 3)(3 \times 2) = 2 \times 2$ — OK.
Oba výsledky jsou $2 \times 2$, odčítání je možné.
Otázka 6 — Homogenní soustava (3 body)
Najděte všechna řešení homogenní soustavy:
$$\begin{aligned} x_1 + 2x_2 - x_3 &= 0 \\ 2x_1 + 3x_2 + x_3 &= 0 \\ 3x_1 + 5x_2 &= 0 \\ x_1 + x_2 + 2x_3 &= 0 \end{aligned}$$$R_2 \leftarrow R_2 - 2R_1$, $R_3 \leftarrow R_3 - 3R_1$, $R_4 \leftarrow R_4 - R_1$:
$$\left(\begin{array}{ccc|c} 1 & 2 & -1 & 0 \\ 0 & -1 & 3 & 0 \\ 0 & -1 & 3 & 0 \\ 0 & -1 & 3 & 0 \end{array}\right)$$$R_3 \leftarrow R_3 - R_2$, $R_4 \leftarrow R_4 - R_2$:
$$\left(\begin{array}{ccc|c} 1 & 2 & -1 & 0 \\ 0 & -1 & 3 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \end{array}\right)$$Hodnost je 2, máme 3 neznámé — $x_3$ je volná proměnná. Položme $x_3 = t$.
$-x_2 + 3t = 0 \Rightarrow x_2 = 3t$
$x_1 + 6t - t = 0 \Rightarrow x_1 = -5t$
Množina řešení je podprostor dimenze 1 (přímka):
$$\vec{x} = t \begin{pmatrix} -5 \\ 3 \\ 1 \end{pmatrix}, \quad t \in \mathbb{R}$$Fundamentální systém řešení: $\left\{\begin{pmatrix} -5 \\ 3 \\ 1 \end{pmatrix}\right\}$.