# Solving a system of equations with numerical approximation [closed]

Let a, b, c be vectors obtained with the function N and x, y be scalars. I have the equation:

Solve[a == x b + y c, {x, y}]


Since I have used N, I get an empty solution, but I know that a solution exists.

Is there any way to find some sort of approximation such that the equation is satisfied?

I don't know how to do it. but maybe a solution with an interval for x and y?

$$x \pm c1$$ and $$y \pm c2$$

## closed as off-topic by Daniel Lichtblau, m_goldberg, xzczd, b3m2a1, Lukas LangNov 4 '18 at 12:26

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Daniel Lichtblau, b3m2a1, Lukas Lang
If this question can be reworded to fit the rules in the help center, please edit the question.

## 2 Answers

This is a linear equation, and you are probably looking for a least squares solution. So,

LeastSquares[Transpose[{b, c}], a]


should work.

To problem here is that there are either no or infinitely many (a line of) solutions.

By using Solve, you are asking Mathematica to solve for $$x$$ and $$y$$, which is not possible, as the system of equations is under defined. You can either solve for one of the unkowns

Solve[a == x b + y c, {x}] or reduce the equations into simpler conditions

Reduce[a == x b + y c, {x, y}] 