Cvičný test 3
Otázka 1 — Slovní úloha (3 body)
Investor rozděluje $100\,000$ Kč mezi tři typy investic. První přináší roční výnos $5\%$, druhá $8\%$ a třetí $12\%$. Do třetí investice vloží o $10\,000$ Kč více než do první. Celkový roční výnos má být $8\,600$ Kč. Kolik vloží do každé investice?
Označme $x_1, x_2, x_3$ investované částky (v tisících Kč).
$$\begin{aligned} x_1 + x_2 + x_3 &= 100 \quad \text{(celkem)} \\ 0{,}05x_1 + 0{,}08x_2 + 0{,}12x_3 &= 8{,}6 \quad \text{(výnos)} \\ x_3 - x_1 &= 10 \quad \text{(podmínka)} \end{aligned}$$Druhou rovnici vynásobíme 100:
$$\begin{aligned} x_1 + x_2 + x_3 &= 100 \\ 5x_1 + 8x_2 + 12x_3 &= 860 \\ -x_1 + 0x_2 + x_3 &= 10 \end{aligned}$$$R_2 \leftarrow R_2 - 5R_1$, $R_3 \leftarrow R_3 + R_1$:
$$\left(\begin{array}{ccc|c} 1 & 1 & 1 & 100 \\ 0 & 3 & 7 & 360 \\ 0 & 1 & 2 & 110 \end{array}\right)$$$R_2 \leftarrow R_2 - 3R_3$:
$$\left(\begin{array}{ccc|c} 1 & 1 & 1 & 100 \\ 0 & 0 & 1 & 30 \\ 0 & 1 & 2 & 110 \end{array}\right)$$Prohodíme $R_2 \leftrightarrow R_3$:
$$\left(\begin{array}{ccc|c} 1 & 1 & 1 & 100 \\ 0 & 1 & 2 & 110 \\ 0 & 0 & 1 & 30 \end{array}\right)$$$x_3 = 30$
$x_2 + 60 = 110 \Rightarrow x_2 = 50$
$x_1 + 50 + 30 = 100 \Rightarrow x_1 = 20$
Do první investice: 20 000 Kč, do druhé: 50 000 Kč, do třetí: 30 000 Kč.
Ověření: $30 - 20 = 10$ (OK), $0{,}05 \cdot 20 + 0{,}08 \cdot 50 + 0{,}12 \cdot 30 = 1 + 4 + 3{,}6 = 8{,}6$ tis. Kč.
Otázka 2 — Soustava s parametrickým řešením (3 body)
Řešte soustavu lineárních rovnic:
$$\begin{aligned} x_1 + 2x_2 - x_3 + x_4 &= 3 \\ 2x_1 + 4x_2 + x_3 - 2x_4 &= 1 \\ 3x_1 + 6x_2 - 4x_3 + 4x_4 &= 10 \end{aligned}$$$R_2 \leftarrow R_2 - 2R_1$, $R_3 \leftarrow R_3 - 3R_1$:
$$\left(\begin{array}{cccc|c} 1 & 2 & -1 & 1 & 3 \\ 0 & 0 & 3 & -4 & -5 \\ 0 & 0 & -1 & 1 & 1 \end{array}\right)$$$R_3 \leftarrow 3R_3 + R_2$:
$$\left(\begin{array}{cccc|c} 1 & 2 & -1 & 1 & 3 \\ 0 & 0 & 3 & -4 & -5 \\ 0 & 0 & 0 & -1 & -2 \end{array}\right)$$Hodnost matice je 3, máme 4 neznámé — $x_2$ je volná proměnná. Položme $x_2 = t$, $t \in \mathbb{R}$.
$-x_4 = -2 \Rightarrow x_4 = 2$
$3x_3 - 8 = -5 \Rightarrow 3x_3 = 3 \Rightarrow x_3 = 1$
$x_1 + 2t - 1 + 2 = 3 \Rightarrow x_1 = 2 - 2t$
Soustava má nekonečně mnoho řešení závislých na parametru $t \in \mathbb{R}$:
$$\vec{x} = \begin{pmatrix} 2 \\ 0 \\ 1 \\ 2 \end{pmatrix} + t \begin{pmatrix} -2 \\ 1 \\ 0 \\ 0 \end{pmatrix}, \quad t \in \mathbb{R}$$Otázka 3 — Cramerovo pravidlo (3 body)
Pomocí Cramerova pravidla řešte soustavu:
$$\begin{aligned} 2x + y - z &= 3 \\ x - y + 2z &= -1 \\ 3x + 2y + z &= 4 \end{aligned}$$Otázka 4 — Složené lineární zobrazení (5 bodů)
Jsou dána lineární zobrazení $f: \mathbb{R}^2 \to \mathbb{R}^3$ a $g: \mathbb{R}^3 \to \mathbb{R}^2$ s maticemi ve standardních bázích:
$$\mathbf{F} = \begin{pmatrix} 1 & 2 \\ -1 & 0 \\ 3 & 1 \end{pmatrix}, \qquad \mathbf{G} = \begin{pmatrix} 2 & 0 & 1 \\ -1 & 3 & 2 \end{pmatrix}$$a) Najděte matici složeného zobrazení $g \circ f$.
b) Najděte $(g \circ f)(1, -1)^T$.
c) Je zobrazení $g \circ f$ invertibilní?
Matice $g \circ f$ je součin $\mathbf{G} \cdot \mathbf{F}$:
$$\mathbf{G} \cdot \mathbf{F} = \begin{pmatrix} 2 & 0 & 1 \\ -1 & 3 & 2 \end{pmatrix} \begin{pmatrix} 1 & 2 \\ -1 & 0 \\ 3 & 1 \end{pmatrix}$$ $$= \begin{pmatrix} 2+0+3 & 4+0+1 \\ -1-3+6 & -2+0+2 \end{pmatrix} = \begin{pmatrix} 5 & 5 \\ 2 & 0 \end{pmatrix}$$$\det(\mathbf{G}\mathbf{F}) = 5 \cdot 0 - 5 \cdot 2 = -10 \neq 0$
Determinant je nenulový, matice je regulární, zobrazení $g \circ f: \mathbb{R}^2 \to \mathbb{R}^2$ je invertibilní.
Inverzní matice:
$$(g \circ f)^{-1} = \frac{1}{-10}\begin{pmatrix} 0 & -5 \\ -2 & 5 \end{pmatrix} = \begin{pmatrix} 0 & \frac{1}{2} \\ \frac{1}{5} & -\frac{1}{2} \end{pmatrix}$$a) Matice $g \circ f$: $\begin{pmatrix} 5 & 5 \\ 2 & 0 \end{pmatrix}$
b) $(g \circ f)(1,-1)^T = (0, 2)^T$
c) Ano, $g \circ f$ je invertibilní ($\det = -10 \neq 0$).
Otázka 5 — Inverzní matice (3 body)
Najděte inverzní matici k matici:
$$\mathbf{A} = \begin{pmatrix} 1 & 1 & 2 \\ 1 & 2 & 3 \\ 1 & 1 & 4 \end{pmatrix}$$$R_2 \leftarrow R_2 - R_1$, $R_3 \leftarrow R_3 - R_1$:
$$\left(\begin{array}{ccc|ccc} 1 & 1 & 2 & 1 & 0 & 0 \\ 0 & 1 & 1 & -1 & 1 & 0 \\ 0 & 0 & 2 & -1 & 0 & 1 \end{array}\right)$$$R_3 \leftarrow \frac{1}{2}R_3$:
$$\left(\begin{array}{ccc|ccc} 1 & 1 & 2 & 1 & 0 & 0 \\ 0 & 1 & 1 & -1 & 1 & 0 \\ 0 & 0 & 1 & -\frac{1}{2} & 0 & \frac{1}{2} \end{array}\right)$$$R_2 \leftarrow R_2 - R_3$, $R_1 \leftarrow R_1 - 2R_3$:
$$\left(\begin{array}{ccc|ccc} 1 & 1 & 0 & 2 & 0 & -1 \\ 0 & 1 & 0 & -\frac{1}{2} & 1 & -\frac{1}{2} \\ 0 & 0 & 1 & -\frac{1}{2} & 0 & \frac{1}{2} \end{array}\right)$$$R_1 \leftarrow R_1 - R_2$:
$$\left(\begin{array}{ccc|ccc} 1 & 0 & 0 & \frac{5}{2} & -1 & -\frac{1}{2} \\ 0 & 1 & 0 & -\frac{1}{2} & 1 & -\frac{1}{2} \\ 0 & 0 & 1 & -\frac{1}{2} & 0 & \frac{1}{2} \end{array}\right)$$Ověření: $\mathbf{A} \cdot \mathbf{A}^{-1} = \mathbf{E}$.
Otázka 6 — Determinant s parametrem (3 body)
Spočítejte determinant matice v závislosti na parametru $t$ a najděte hodnoty $t$, pro které je determinant nulový:
$$\begin{vmatrix} t & 1 & 0 & 0 \\ 0 & t & 1 & 0 \\ 0 & 0 & t & 1 \\ 1 & 0 & 0 & t \end{vmatrix}$$V prvním sloupci jsou nenulové pouze prvky na pozicích $(1,1)$ a $(4,1)$:
$$= t \cdot \begin{vmatrix} t & 1 & 0 \\ 0 & t & 1 \\ 0 & 0 & t \end{vmatrix} + (-1)^{4+1} \cdot 1 \cdot \begin{vmatrix} 1 & 0 & 0 \\ t & 1 & 0 \\ 0 & t & 1 \end{vmatrix}$$První subdeterminant — horní trojúhelníková matice:
$$\begin{vmatrix} t & 1 & 0 \\ 0 & t & 1 \\ 0 & 0 & t \end{vmatrix} = t^3$$Druhý subdeterminant — dolní trojúhelníková matice:
$$\begin{vmatrix} 1 & 0 & 0 \\ t & 1 & 0 \\ 0 & t & 1 \end{vmatrix} = 1$$(V reálných číslech. Nad $\mathbb{C}$ by platilo také $t = \pm i$.)
$\det = t^4 - 1$. Determinant je nulový pro $t = 1$ a $t = -1$.