I was looking for general solutions of an equation I already solved for specific values with LinearSolve, but using Reduce returned False.

Here's the code:

B = {{c, 1}, {c, d}, {1, c}};
v = {1, 1, 2};
Reduce[B.x == v, {c, d}, Reals]

This returned False

The case I solved was:

d = 1;
c = 2;
LinearSolve[B, v]

This returned {0, 1}

What am I doing wrong? Thanks for your help :)


closed as off-topic by Daniel Lichtblau, m_goldberg, MarcoB, José Antonio Díaz Navas, bbgodfrey Mar 29 at 15:12

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, m_goldberg, MarcoB, José Antonio Díaz Navas, bbgodfrey
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ Try Reduce[B.{x, y} == v, {x, y}, Reals]. $\endgroup$ – Henrik Schumacher Mar 13 at 13:27
  • 2
    $\begingroup$ Technically, you should be doing LeastSquares[{{c, 1}, {c, d}, {1, c}}, {1, 1, 2}]. $\endgroup$ – J. M. is away Mar 13 at 13:29
  • 3
    $\begingroup$ To make that explicit, you can't use a symbolic vector in Reduce (x in your example). Write the components. $\endgroup$ – Szabolcs Mar 13 at 13:30
  • $\begingroup$ Writing x as a vector {x,y} did the trick, thank you all! $\endgroup$ – Lorad Mar 13 at 13:42
  • $\begingroup$ @Lorad, would you write that up as an answer to your question? Self-answers are encouraged here, and it would help to have this question show up as answered if anybody else in the future might run across it. $\endgroup$ – MarcoB Mar 13 at 17:45

Thanks to the comments I realized my mistake and was able to solve it quite easily. My mistake was that I put an x as placeholder for a 2-dimensional vector, but mathematica interprets that as just a variable. If I write {x,y} instead of x, mathematica can solve the equation.

Reduce[B.{x, y} == v, {c, d}, Reals]

Not the answer you're looking for? Browse other questions tagged or ask your own question.