cholesky: Cholesky Decomposition

Exercise template for computing the Cholesky decomposition of a simple randomly-generated 3x3 or 4x4 matrix (by hand).

Name:
cholesky
Type:
Description:
Computing the Cholesky decomposition of a randomly-generated symmetric positive-definite matrix (3x3 or 4x4) whose Cholesky factor has only integer elements between -5 and 5. The exercise can be solved by computing the Cholesky decomposition and then checking five corresponding multiple-choice items, generated randomly with matrix_to_mchoice().
Solution feedback:
Yes
Randomization:
Random numbers and text blocks
Mathematical notation:
Yes
Verbatim R input/output:
No
Images:
No
Other supplements:
No
Raw: (1 random version)
PDF:
cholesky-Rnw-pdf
cholesky-Rmd-pdf
HTML:
cholesky-Rnw-html
cholesky-Rmd-html

(Note that the HTML output contains mathematical equations in MathML. It is displayed by browsers with MathML support like Firefox or Safari - but not Chrome.)

Demo code:

library("exams")

set.seed(1090)
exams2html("cholesky.Rnw")
set.seed(1090)
exams2pdf("cholesky.Rnw")

set.seed(1090)
exams2html("cholesky.Rmd")
set.seed(1090)
exams2pdf("cholesky.Rmd")