Approximately solve system of equations

In summary: The system has an overdetermined set of equations because you have more than one solution. Many systems, especially in statistical analysis, have an overdetermined set of equations because you often have more than one possible solution to a problem. There are a few ways to find the solutions, but the most common way is to use a computer. You can try some of the more brute force methods like exhaustive search or conjugate gradient, but in most cases it will be faster to use a computer to find the solution.If you're trying to approximate the variables, it's a good idea to try to use rational values for the coefficients. This will make the calculation a bit easier and avoid some of the more tedious numerical techniques
  • #1
zmalone
10
0
I have a 3 variable system of equations (no solution) and am trying to solve for variables of an Ax = b to be as close to b as possible without changing A.

28446757643x + 82500000y + z = 13557300
283009432x + 283009432y + z = 10264100
14180045548x + 82500000y + z = 3651510

I am fiddinling around trying to solve in R but there are no exact solutions and I cannot figure out how to approximate the variables to give the closest values to the other side of the equation. Eventually this is all going in excel, so if there is a Solver way to handle this that might just be easier to use.

Any help is appreciated, thanks!
 
Physics news on Phys.org
  • #2
Those are linear equation with integer coefficients- there certainly are "exact solutions". The solutions are rational numbers so can be written as fractions. Subtracting the second equation from the first gives 25606748211x- 200509432y= 3293200. Subtracting the second equation from the third gives 13897036116x- 200509432y= -6612590. The arithmetic is tedious but very basic.
 
  • #3
well...

So I was just trying to see if there was a trend in this 3x3 subest of the entire matrix which is 266x3

So I guess to rephrase my problem, I will have 266 equations with 3 variables and that is why I want to approximate the variables as close as possible and examine the outliers. Is there a way in excel or R to automate this process that anyone could think of? Sorry if this sounds all over the place, it's been a while since I've had to do real math outside of school without being given equations haha. Thanks!
 
  • #4
zmalone said:
So I was just trying to see if there was a trend in this 3x3 subest of the entire matrix which is 266x3

So I guess to rephrase my problem, I will have 266 equations with 3 variables and that is why I want to approximate the variables as close as possible and examine the outliers. Is there a way in excel or R to automate this process that anyone could think of? Sorry if this sounds all over the place, it's been a while since I've had to do real math outside of school without being given equations haha. Thanks!

It's not clear from where you develop these 266 equations, but you have an overdetermined system of linear equations. Such a system arises often in doing a linear regression on a set of data. You write an equation in the unknown linear coefficients for each data point in your data set, and then you want to find the linear coefficients which minimize the error between the regression line and the data points.

http://en.wikipedia.org/wiki/Overdetermined_system

The traditional method to solve such systems is to form the so-called 'normal equations'.

You start with the matrix equation:

Ay = b,

where A is an n x m rectangular matrix, and y and b are n x 1 column vectors. To form the normal equation, multiply both sides by the transpose of matrix A:

[itex]A^{T}A y = A^{T}b[/itex]

The product [itex]A^T A[/itex] is a matrix with n rows and n columns [edit: corrected size of normal matrix], and in theory the resulting normal equations could be solved using standard techniques, like Gaussian elimination, for example.

However, for reasons too technical to discuss here, solving the normal equations can lead to inaccurate results due to round off error in floating point calculations. Fortunately, different numerical methods have been developed which help to minimize loss of accuracy due to floating point errors. One of these is called the QR factorization or QR decomposition:

http://en.wikipedia.org/wiki/QR_factorization

The QR method allows you to factor the original overdetermined system without needing to form the normal equations. It's one of the more useful developments made by numerical analysis in the 20th century, IMO.
 
Last edited:

FAQ: Approximately solve system of equations

What does it mean to "approximately solve a system of equations"?

Approximately solving a system of equations means finding an approximate solution to a set of equations, rather than an exact solution. This is often done using numerical methods, such as substitution or elimination, to find a solution that is close enough to the actual solution.

Why would I need to approximately solve a system of equations?

There are several reasons why you may need to approximately solve a system of equations. One common reason is when the equations are too complex to solve exactly, or when there are too many variables to solve for. Additionally, in real-world scenarios, exact solutions may not be necessary and an approximate solution may be sufficient for practical purposes.

What are the different methods for approximately solving a system of equations?

Some common methods for approximately solving a system of equations include substitution, elimination, and graphical methods. Other numerical methods, such as Gaussian elimination or Newton's method, can also be used.

How accurate is an approximate solution to a system of equations?

The accuracy of an approximate solution depends on the method used and the complexity of the equations. In general, the more iterations and calculations involved, the more accurate the solution will be. However, there may still be some margin of error in an approximate solution compared to an exact solution.

Are there any drawbacks to approximately solving a system of equations?

One drawback of approximate solutions is that they may not provide a complete understanding of the system. They may also be less precise than exact solutions, which could be important in certain applications. Additionally, some methods for approximately solving equations may be computationally intensive or time-consuming.

Similar threads

Back
Top