<s>[INST] How to apply LU factorization to find a polynomial of degree 3 that passes through given points I am familiar with LU factorization when given a matrix to begin with, but I don't know how to apply it in order to solve a problem of this sort.  
Find the polynomial (of degree 3) passes through the following points:
(1,-5),(2,-8),(3,9),(4,31)
 [/INST] Let us write
$$f(x)=ax^3+bx^2+cx+d$$
Then
$$-5=a+b+c+d\\
-8=8a+4b+2c+d\\
9=27a+9b+3c+d\\
31=64a+16b+4c+d\\
\implies\begin{pmatrix}1&1&1&1\\8&4&2&1\\27&9&3&1\\64&16&4&1\end{pmatrix}\begin{pmatrix}a\\b\\c\\d\end{pmatrix}=\begin{pmatrix}-5\\-8\\9\\31\end{pmatrix}\\
\implies \begin{pmatrix}a\\b\\c\\d\end{pmatrix}=\begin{pmatrix}-\dfrac{1}{6}&\dfrac{1}{2}&-\dfrac{1}{2}&\dfrac{1}{6}\\\dfrac{3}{2}&-4&\dfrac{7}{2}&-1\\-\dfrac{13}{3}&\dfrac{19}{2}&-7&\dfrac{11}{6}\\4&-6&4&-1\end{pmatrix}\begin{pmatrix}-5\\-8\\9\\31\end{pmatrix}$$
You should be able to take it from here.
</s>