2

I was defining the following assumptions

$Assumptions = {A ∈ Matrices[{3, 3}, Reals], 
  x ∈ Vectors[3, Reals], b ∈ Vectors[3, Reals]}
Reduce[A . x == b, x]

or

Solve[A . x == b, x]

None of them is working. I was expecting something in the lines of x = Inv(A).b

bmf
  • 15,157
  • 2
  • 26
  • 63

1 Answers1

1

You can proceed in the following way to obtain an analytic solution, albeit not as compact as one might have hoped for.

n = 3;
amat = Array[a, {n, n}];
xvec = Array[x, n];
bvec = Array[b, n];
sltn = Solve[amat . xvec - bvec == 0, xvec] // Flatten // 
   FullSimplify;

And now you can check your solution

xvec /. sltn // MatrixForm

mat

You can, also, check explicitly with the expected compact answer

LinearAlgebra`Private`ZeroArrayQ[(Inverse[amat] . bvec // 
    FullSimplify) - (xvec /. sltn)]

true

bmf
  • 15,157
  • 2
  • 26
  • 63
  • This seems overly complicated for such a simple linear equations ... where I just want a reduce of the equation – Andrei Chalapco Jan 12 '23 at 16:58
  • @AndreiChalapco I understand that it seems like that, but perhaps you want to have a look here and understand why I suggested the above solution :-) – bmf Jan 12 '23 at 17:01