1/29/2020 Homework 1
Homework #1
The goal of this homework it to reinforce the first part of our unit on numerical linear algebra, and to begin to get you acclimated with writing up your homework in a Jupyter notebook. This means that you will need to begin to learn how to write regular text using Markdown, mathematics using LaTeX, and entering simple commands in Julia. There are many resources online for each of these. Some specific resources are
Markdown references
Cheatsheet: https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet (https://github.com/adam-p/markdown-here/wiki/Markdown-Here-Cheatsheet)
Full reference: https://daringfireball.net/projects/markdown/syntax (https://daringfireball.net/projects/markdown/syntax)
LaTeX references
Cheatsheet: https://wch.github.io/latexsheet/latexsheet.pdf (https://wch.github.io/latexsheet/latexsheet.pdf) Full reference (unofficial): http://texdoc.net/texmf-dist/doc/latex/latex2e-help-texinfo/latex2e.pdf (http://texdoc.net/texmf-dist/doc/latex/latex2e-help-texinfo/latex2e.pdf)
Julia resources
Documentation (v1.2): https://docs.julialang.org/en/v1.2/ (https://docs.julialang.org/en/v1.2/) Free Online Textbook: https://benlauwens.github.io/ThinkJulia.jl/latest/book.html (https://benlauwens.github.io/ThinkJulia.jl/latest/book.html)
One of the easiest ways to learn some the syntax for Markdown, LaTeX and Julia is to double-click on a cell in the lecture notebooks and see how I did it.
Problem 1
Generate a random matrix and a random right-hand-side .
1. Use Julia to do an LU decomposition on your matrix . Solve
and with appropriate right-hand-sides. Show the work done by Julia in the output cells (this should be
automatic).
2. Take the Julia output and typeset it using LaTeX in Markdown cells.
In [ ]:
https://notebooks.hpc.uiowa.edu/11837075-648397/user/pudchen/nbconvert/html/Homework 1.ipynb?download=false 1/2
by using the backslash operator on
𝑏 = 𝑥𝐴 𝐴 𝑏1×4𝐴4×4
𝑈𝐿
1/29/2020 Homework 1
To turn in your homework as a pdf file, you will probably get the best result by doing the following in your browser:
1. Go to File -> Print Preview in the menu to open a window with the print preview in it. 2. “Print” the Print Preview to a pdf file instead of a printer in the printer options.
This usually gives a nicer result than using the built-in Jupyter print to pdf option.
https://notebooks.hpc.uiowa.edu/11837075-648397/user/pudchen/nbconvert/html/Homework 1.ipynb?download=false 2/2