<jupyter_start><jupyter_text>QR Zerlegung- Gegeben: Matrix $A \in M(m \times n)$- Gesucht: Orthogonale Matrix $Q$ und obere Dreiecksmatrix $R$, sodass $A = Q \cdot R$<jupyter_code># input:
A = matrix([
    [1, 1, 1],
    [2, -4, 1],
    [-2, 1, -3]
])
#<jupyter_output><empty_output><jupyter_text>Orthonormalisieren der Spaltenvektor von $A$ mittels Gram-Schmidt Verfahren:$$ w_1 = \frac{1}{\| v_1 \|} v_1 $$$$ u_i = v_i - \sum_{k=1}^{i-1} \langle v_i, w_k \rangle w_k $$$$ w_i = \frac{1}{\| u_i \|} u_i $$<jupyter_code>V = [vector(v for v in col) for col in A.T]
W = []
U = []
W.append((1/(V[0].norm())) * V[0])
show(LatexExpr("v_0 ="), V[0])
show(LatexExpr("w_0 ="), W[0])
print
for i, v in enumerate(V[1:]):
    show(LatexExpr("v_{} =".format(i+1)), v)
    s = sum([(v.dot_product(w) * w) for w in W])
    u = v - s
    show(LatexExpr("u_{} =".format(i+1)), u)
    U.append(u)
    w = (1/u.norm()) * u
    show(LatexExpr("w_{} =".format(i+1)), w)
    W.append(w)
    print<jupyter_output><empty_output><jupyter_text>Orthonormalisierte Spaltenvektoren bilden die Spaltenvektoren von $Q$<jupyter_code>Q = matrix(W).T
show(Q)<jupyter_output><empty_output><jupyter_text>Berechnen von $$R = Q^T A$$<jupyter_code>R = Q.T * A
show(R)
show(Q*R)
show(Q*R == A)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.21651090342679127, 'fraction_numerical': 0.021806853582554516, 'mean_word_length': 4.399159663865547, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '569089', 'license': 'Unlicense', 'n_tokens_mistral': 616, 'n_tokens_neox': 605, 'n_words': 125, 'path': 'nrla_QR_zerlegung.ipynb', 'repo_name': 'f0rki/nrla_nbs', 'size': '1284'}