You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/06_Direct_methods.jl
+7-24Lines changed: 7 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -857,7 +857,7 @@ which leads to the following algorithm:
857
857
3. Solve $\mathbf U \mathbf x = \mathbf z$ for $\mathbf x$
858
858
using *backward* substitution.
859
859
860
-
860
+
When we use Julia's backslash `\`-operator, effectively this **Algorithm 5** is executed under the hood.
861
861
"""
862
862
863
863
# ╔═╡ 40f6f4c5-dc86-4834-a6c2-51852d87a3bb
@@ -904,22 +904,6 @@ md"""**Verify result:** This solves the problem $\mathbf{D} \mathbf{x}_D = \math
904
904
# ╔═╡ 25f18e3c-a00b-4d3a-9b5e-60d40eeb5596
905
905
D * xD - b
906
906
907
-
# ╔═╡ cdaead03-fbd7-4ff6-9f31-6296e8d5230f
908
-
md"""
909
-
## Conclusion: What backslash \ really does to solve
910
-
911
-
To conclude this discussion we return to our starting question:
912
-
What does the `\` operator do in Julia.
913
-
914
-
- We already saw that julia essentially solves `A \ b` by replacing it by `lu(A) \ b`.
915
-
- Julia's `lu` by default also performs a row-pivoted LU factorisation,
916
-
providing thus a factorisation $\textbf P \mathbf{A} = \mathbf{L} \mathbf{U}$.
917
-
- The returned object (an `LinearAlgebra.LU` object) internally stores
918
-
both the `L`, the `U` and the permutation matrix `P`
919
-
- When we use `\` with an `LU` object it, Julia immediately exploits the factorised form and performs first (permuted) forward substitution (step 2.) then backward substitution (step 3.).
0 commit comments