Question: convert to vector mode

i had 3 nonlinear equations and i want to convert them to the form of multiplications of a MATRIX in a VECTOR, but none of these two methods give me the right answer,what should i do?

#method one#

restart:
with(LinearAlgebra):
eq1:=a[1]+a[2]*a[3]^2*a[1]+a[2]*a[3]-a[1]^2:
eq2:=a[3]+a[1]^3+a[2]*a[3]+a[2]^2-a[1]^2:
eq3:=a[1]^3+a[2]^3+a[1]*a[2]*a[3]+a[1]*a[2]-a[3]:
for i to 3 do
B || i := eq || i ; K || i := Vector[row](3):
for j to 3 do
K || i[j] := coeff(collect(B || i, a[j]),a[j]):
B || i:=B || i -expand(K || i[j]*a[j]):
od:
od:
K:= Matrix([seq(convert(K || s, list), s = 1 .. 3)]):
V:=Vector(3,i->a[i]);
simplify(K.V);

but the answer is not equal to my equations ?!

#method two#

restart:
with(LinearAlgebra):
eq1:=a[1]+a[2]*a[3]^2*a[1]+a[2]*a[3]-a[1]^2:
eq2:=a[3]+a[1]^3+a[2]*a[3]+a[2]^2-a[1]^2:
eq3:=a[1]^3+a[2]^3+a[1]*a[2]*a[3]+a[1]*a[2]-a[3]:
for i to 3 do
B || i := eq || i ; K || i := Vector[row](3):
for j to 3 do 
K || i[j]:=evalf(factor(convert(select(has, B || i, a[j]),rational,exact))/a[j]):B || i:=B || i -expand(K || i[j]*a[j]):
od:
od:
K:= Matrix([seq(convert(K || s, list), s = 1 .. 3)]):
V:=Vector(3,i->a[i]);
simplify(K.V);

but the answer is not equal to my equations ?!

could some one plz help me?!

Please Wait...