I have a system of linear equations that is derived partially from experimental data. Theoretically, the system should have a single, exact solution; however, experimental error causes it to not have an exact solution. Is there a good method to find an approximate solution to this system? My idea for a naive implementation was to solve all pairs of two equations and average the value for the solutions to each variable, but this doesn't extend well as the number of equations increases. Is there any known algorithm to do this?
It seems you are looking for an optimization (here, specifically a fit).
You have some experimental data and you want to have a simple model explaining it.
The simplest way is using the Ordinary Least Squares. The idea is to minimize the standard deviation or the error you make on the vertical axis.
Another one would be the PCA where you try to find an angle to view your variables to find the maximum information. It's based on the eigenvectors of your system. The advantage is that it only tries to find the best solution to minimize the orthogonal error.
Many other solutions are possibles but it would be preferable to have more details about what you're exactly looking for and the link between variables.
You can use any of the numerical methods that is for linear equation systems. Some of them are;
- Gauss-Jordan Elimination
- Jacobi Method
- Successive Over Relaxation(SOR)
For more info, you can look at this