Nothing
## DATA GENERATION ## number of rows/columns n <- sample(3:4, 1) ## elements on lower triangle (and diagonal) m <- n * (n + 1)/2 L <- matrix(data = 0, nrow = n, ncol = n) diag(L) <- sample(1:5, n, replace = TRUE) L[lower.tri(L)] <- sample(-5:5, m-n, replace = TRUE) ## matrix A for which the Cholesky decomposition should be computed A <- L %*% t(L) ## rnadomly generate questions/solutions/explanations mc <- matrix_to_mchoice( L, ## correct matrix y = sample(-10:10, 5, replace = TRUE), ## random values for comparison lower = TRUE, ## only lower triangle/diagonal name = "\\ell", ## name for matrix elements restricted = TRUE) ## assure at least one correct and one wrong solution
For the matrix
$$
\begin{aligned}
A &= r toLatex(A, escape = FALSE)
.
\end{aligned}
$$
compute the matrix $L = (\ell_{ij})_{1 \leq i,j \leq r n
}$ from the
Cholesky decomposition $A = L L^\top$.
Which of the following statements are true?
answerlist(mc$questions, markup = "markdown")
The decomposition yields
$$
\begin{aligned}
L &= r toLatex(L, escape = FALSE)
\end{aligned}
$$
and hence:
answerlist( ifelse(mc$solutions, "True", "False"), mc$explanations, markup = "markdown")
extype: mchoice
exsolution: r mchoice2string(mc$solutions)
exname: Cholesky decomposition
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.