Challenge: Cholesky Factorization

Solve this challenge on Cholesky factorization in R.

We'll cover the following

Exercise

Write the R code required to perform a Cholesky factorization on the following square symmetric positive-definite matrix:

A=[423251313]A =\begin{bmatrix} 4 & 2 & -3 \\ 2 & 5 & -1 \\ -3 & -1 & 3 \end{bmatrix}

Sample input

This is what the sample input looks like:

c(4, 2, -3, 2, 5, -1, -3, -1, 3)

Expected output

The expected output looks like this:

     [,1] [,2]       [,3]
[1,]    2    1 -1.5000000
[2,]    0    2  0.2500000
[3,]    0    0  0.8291562

Use the code editor below to implement your solution.

Get hands-on with 1200+ tech skills courses.