Explanations Section: Numerical Linear Algebra

Cos-Approx via Least Squares Problem

by Yehor Korotenko

An interactive web visualization demonstrating polynomial approximation of cos(t) using the Least Squares method (Méthode des Moindres Carrés). Users can adjust the number of sample points, the interval, and the polynomial degree (1–12), then observe how the fitted polynomial compares to the true cosine curve. The page also shows the normal equations (A^T·A·x = A^T·b), the Vandermonde matrix A, the resulting polynomial coefficients, and the approximation error ‖Ax − b‖².