Overdetermined System Solver

Find the least squares solution to systems of linear equations where there are more equations than unknowns.

Input Parameters

Enter the coefficient matrix A and the constant vector b to find the least squares solution x.

Enter matrix in valid JSON format. E.g., [[1, 2], [3, 4]]

Enter vector in valid JSON format. E.g., [5, 10, 7]

Solution

Visualization

Visual representation of vectors b (blue), Ax (green), and the least squares solution point x (red).

About Overdetermined Systems and Least Squares

In mathematics, an overdetermined system of linear equations is one where there are more equations than unknowns. Such systems are usually inconsistent, meaning there is no exact solution that satisfies all equations simultaneously. The method of least squares is a standard approach to find an approximate solution to overdetermined systems. It aims to minimize the sum of the squares of the residuals (the differences between the observed and predicted values). In the context of \(Ax = b\), we find an \(\hat{x}\) that minimizes \(||Ax - b||^2\). This solver helps you find this best approximate solution \(\hat{x}\) for given matrix \(A\) and vector \(b\).

Learn more about Least Squares on Wikipedia.