## 520 Reputation

9 years, 162 days

## Social Networks and Content at Maplesoft.com

Seldom to ask question after retired math hobby Just waiting for beauty who born in 1994 And waited for her email to mavio@protonmail.com What is the difference in ownership among different universe?

## @Carl Love  _EnvAllSolutions := tr...

_EnvAllSolutions := true;
solve(z^n - z = 0, z);
exp(-(2*I)*Pi*_Z1/(n-1)), 0;

there is _Z1,

is there any things need to assume?

## @tomleslie  i tried and comment be...

i tried and comment below, there is blank graph and error occur

M:=Matrix([[19,5,12+x/10],[12,7,21+x/10],[5,12,19+x/10]]);
e,v:=Eigenvectors(M):
colors:=[red,green,blue]:
display(Array(1..3, [seq( plot(e[j], x=-50..50, color=colors[j]), j=1..3)]));
display(Array(1..3,[ seq( spacecurve( v[..,j], x=-50..50, color=colors[j]), j=1..3)])); # blank graph?

restart:
with(LinearAlgebra):
with(plots):
randomize():
M:=Matrix([[19,5,12+x/10],[12,7,21+x/10],[5,12,19+x/10]]);
e,v:=Eigenvectors(M):
colors:=[red,green,blue]:
display(Array(1..3, [seq( complexplot(evalc(e[j]), x=-50..50, color=colors[j]), j=1..3)]));
display(Array(1..3,[ seq( spacecurve( Re(v[..,j]), x=-50..50, color=colors[j]), j=1..3)]));
display(Array(1..3,[ seq( spacecurve( Im(v[..,j]), x=-50..50, color=colors[j]), j=1..3)])); # Error

Error, invalid input: `simpl/Im` expects its 1st argument, x, to be of type {boolean, algebraic}, but received Vector(3, {(1) = (1/100)*(1900*x^2+22500*x+75000+70*x^3+(1500*I)*3^(1/2)*x+(15000*I)*3^(1/2)+x^4+3000*(-(1/20)*x-3/2+((1/20)*I)*3^(1/2)*x+((1/2)*I)*3^(1/2))*x+100*(-(1/20)*x-3/2+((1/20)*I)*3^(1/2)*x+((1/2)*I)*3^(1/2))*x^2)/(((-(1/20)*x-3/2+((1/20)*I)*3^(1/2)*x+((1/2)*I)*3^(1/2))*x^2+40*(-(1/20)*x-3/2+((1/20)*I)*3^(1/2)*x+((1/2)*I)*3^(1/2))*x+25*x-150+(25*I)*3^(1/2)*x+(250*I)*3^(1/2)+x^2)*(-(1/20)*x-3/2+((1/20)*I)*3^(1/2)*x+((1/2)*I)*3^(1/2))), (2) = -(1/10)*(-50*x^2-850*x-4500-x^3+(50*I)*3^(1/2)*x+(500*I)*3^(1/2))/((-(1/20)*x-3/2+((...

## @Carl Love  i had learnt in s...

i had learnt in secondary school

and read books about it but I forget and lazy to find.

i think I can find it again

but my book use elimination to do

however this method is not maple use

i tried this many years ago.

I just use QR algorithm to do, but discover that it can not output small integer fraction complex number.

is there any book shown the derive of QR from real number to complex number?

## @Carl Love  i use  3 x 3 or 4...

i use  3 x 3 or 4 x 4 matrix

but do not know whether diagonal is also symmetric , is there any function to check whether symmetric?

i just compare eigenvectors

by observe perturbation to how it change when input change

i remember physics package had also a eigenvector function ? Is it?

should I use physics package ?

do you know physics package use integer, fraction or float , which is standard or accurate?

i would go home to compare physics package with linear algebra package to see which numeric are they match

if the most accurate come from floating number, how do beautiful fraction come from? Which algorithm can output beautiful and small integer complex eigenvectors?

## @Carl Love  if both are the same b...

if both are the same basically after normalised , then which algorithm ‘s solution is the correct and standard in physics? Floating or fraction or integer? Is there only two algorithms? Or three?

it seems need to care whether algorithm using is consistent in whole operation.

## @Carl Love  when calculating eigen...

when calculating eigenvector after use QR iteration  to calculate eigenvalues,

i use Rayleigh iterations, but eigenvector result is not equal to official function of eigenvector, where is wrong?

solve(sqrt(x^2 + x^2 + x^2) = 1, x);
yk := Matrix([[(1/3)*sqrt(3)],[(1/3)*sqrt(3)],[(1/3)*sqrt(3)]]):
evalf(sqrt(yk[1,1]*yk[1,1] + yk[2,1]*yk[2,1] + yk[3,1]*yk[3,1]));
v0 := Matrix([[(1/3)*sqrt(3)],[(1/3)*sqrt(3)],[(1/3)*sqrt(3)]]):

EigenVector2 := proc(e1,e2,e3)
u := e1:
vk := Matrix([[(1/3)*sqrt(3)],[(1/3)*sqrt(3)],[(1/3)*sqrt(3)]]):
for i from 1 to 3 do
yk := MatrixMatrixMultiply(MatrixInverse(M - u*Matrix([[1,0,0],[0,1,0],[0,0,1]])), vk);
vk := yk/sqrt(yk[1,1]*yk[1,1] + yk[2,1]*yk[2,1] + yk[3,1]*yk[3,1]);
Mvk := MatrixMatrixMultiply(M, vk);
u := (Mvk[1,1]*vk[1,1] + Mvk[2,1]*vk[2,1] + Mvk[3,1]*vk[3,1])/(vk[1,1]*vk[1,1] + vk[2,1]*vk[2,1] + vk[3,1]*vk[3,1]); #Rayleigh
od:
v1 := evalf(vk);

u := e2:
vk := Matrix([[(1/3)*sqrt(3)],[(1/3)*sqrt(3)],[(1/3)*sqrt(3)]]):
for i from 1 to 3 do
yk := MatrixMatrixMultiply(MatrixInverse(M - u*Matrix([[1,0,0],[0,1,0],[0,0,1]])), vk);
vk := yk/sqrt(yk[1,1]*yk[1,1] + yk[2,1]*yk[2,1] + yk[3,1]*yk[3,1]);
Mvk := MatrixMatrixMultiply(M, vk);
u := (Mvk[1,1]*vk[1,1] + Mvk[2,1]*vk[2,1] + Mvk[3,1]*vk[3,1])/(vk[1,1]*vk[1,1] + vk[2,1]*vk[2,1] + vk[3,1]*vk[3,1]);
od:
v2 := evalf(vk);

u := e3:
vk := Matrix([[(1/3)*sqrt(3)],[(1/3)*sqrt(3)],[(1/3)*sqrt(3)]]):
for i from 1 to 3 do
yk := MatrixMatrixMultiply(MatrixInverse(M - u*Matrix([[1,0,0],[0,1,0],[0,0,1]])), vk);
vk := yk/sqrt(yk[1,1]*yk[1,1] + yk[2,1]*yk[2,1] + yk[3,1]*yk[3,1]);
Mvk := MatrixMatrixMultiply(M, vk);
u := (Mvk[1,1]*vk[1,1] + Mvk[2,1]*vk[2,1] + Mvk[3,1]*vk[3,1])/(vk[1,1]*vk[1,1] + vk[2,1]*vk[2,1] + vk[3,1]*vk[3,1]);
od:
v3 := evalf(vk);
return [v1, v2, v3];
end proc:

uu := evalf(EigenValues2(M,7));
EigenVector2(uu[1,1],uu[2,2],uu[3,3]); # uu are the eigenvalues

v, e := evalf(Eigenvectors(M));

## @tomleslie  i use QR iterations,&n...

i use QR iterations,

--- it can approximate decimal number of eigenvalues, but can not do exact fraction of maple official function do.

--- QR iterations only return eigenvalues, how about eigenvectors? how do QR iterations do eigenvectors?

## @Carl Love  how to use Givens...

how to use GivensRotationMatrix in maple 2015?

i use matrix or vector , still return error

A2 := GivensRotationMatrix(A1, 1, 2);
Error, (in LinearAlgebra:-GivensRotationMatrix) invalid input: LinearAlgebra:-GivensRotationMatrix expects its 1st argument, V, to be of type Vector() but received A1

with(LinearAlgebra):

A := array(0 .. 2, 0 .. 2, [[1, 2, 3], [4, 5, 6], [7, 8, 9]]);
A1 := convert(A, vector);
A := Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]);
A1 := convert(A, vector);

A2 := GivensRotationMatrix(A1, 1, 2);

## @Carl Love    with(Groebner)...

with(Groebner):
sol := [{a*b = 1, c*d = 1, conjugate(a*c) - b*d = 0, a*d-b*c = sqrt(3)*I}, {}];
K := {(rhs(sol)-lhs(sol))-x1,(rhs(sol)-lhs(sol))-x2,(rhs(sol)-lhs(sol))-x3,(rhs(sol)-lhs(sol))-x4};
G := Basis(K, 'tord', degrevlex(x1,x2,x3,x4));
R1 := eliminate(G, {x1,x2,x3,x4}); # eliminate is the reverse of Basis
nops(G);
nops(K);
Ga := Basis({a*G,a*G,a*G,a*G, (1-a)*K, (1-a)*K, (1-a)*K, (1-a)*K}, 'tord', deglex(a,x1,x2,x3,x4));
Ga := remove(has, Ga, [u1,u2,u3,u4,a]);

i tried this method , but it return  ,

is there method to find the rest ?

## @Carl Love  how to correctly use e...

how to correctly use eliminate for this example?

i tried eliminate but it return another set of a,b,c,d

isn't it to use input set and output set or/and the rest properties ?

m5 := eliminate([AA[1,1]=0,AA[1,2]=0,AA[2,1]=0,AA[2,2]=0, Jesus2[1,1]=a, Jesus2[1,2]=b, Jesus2[2,1]=c, Jesus2[2,2]=d],[a,b,c,d]);
m5 := eliminate([AA[1,1]=0,AA[1,2]=0,AA[2,1]=0,AA[2,2]=0, Jesus2[1,1]=a, Jesus2[1,2]=b, Jesus2[2,1]=c, Jesus2[2,2]=d,a*b = 1, c*d = 1, conjugate(a*c)-b*d = 0],[a,b,c,d]);

m5 := [{a = -(1/2)*(3439+(1145*I)*sqrt(3))/(1+(1146*I)*sqrt(3)), b = -(1/2)*(-3439+(1145*I)*sqrt(3))/(-1+(1146*I)*sqrt(3)), c = -(1/2)*(-3942243+(1311025*I)*sqrt(3))/(-2292+(1313317*I)*sqrt(3)), d = -(1/2)*(3942243+(1311025*I)*sqrt(3))/(2292+(1313317*I)*sqrt(3))}, {AA[1, 1], AA[1, 2], AA[2, 1], AA[2, 2]}]

## @Carl Love  i try sylvester solve(...

i try sylvester solve(jesus7, jesus7, matrix([[0,0],[0,0]]) in maple 2015

but it return 0 matrix , why can not solve ?

but it actually has solution.

## @Carl Love i have tried eliminiate ...

i have tried eliminiate but no solution return

m5 := solve([AA[1,1]=0,AA[1,2]=0,AA[2,1]=0,AA[2,2]=0, a= Jesus2[1,1], b=Jesus2[1,2], c=Jesus2[2,1], d=Jesus2[2,2], a*b = 1, c*d = 1, conjugate(a*c)-b*d = 0,a*d-b*c=sqrt(3)*I],[a,b,c,d]);

Original question is how to solve a, b, c and d for below equations:

Both known Matrix and solution Matrix Properties

Matrix([[a,b],[c,d]]);
a*b = 1
c*d = 1

conjugate(a*c)-b*d = 0
Determinant(Matrix([[a,b],[c,d]])) = sqrt(3)*I
a*d-b*c = sqrt(3)*I

How to solve system AA when known Jesus7 to find Jesus2 which is Matrix([[a,b],[c,d]]) ?

Jesus7 := Matrix(2, 2, {(1, 1) = (1296309/5)*(22243/5+((7358/5)*I)*sqrt(3))/((-384813/10+((33701837/10)*I)*sqrt(3))*(-2277/10+((13/10)*I)*sqrt(3))), (1, 2) = (1296309/5)*(22243/5-((7358/5)*I)*sqrt(3))/((-384813/10-((33701837/10)*I)*sqrt(3))*(-2277/10-((13/10)*I)*sqrt(3))), (2, 1) = -(1/5)*(-25372581+(8329256*I)*sqrt(3))/(-384813/10+((33701837/10)*I)*sqrt(3)), (2, 2) = -(1/5)*(-25372581-(8329256*I)*sqrt(3))/(-384813/10-((33701837/10)*I)*sqrt(3))});

AA := simplify(MatrixMatrixMultiply(Matrix([[a,b],[c,d]]),Jesus7)- MatrixMatrixMultiply(Jesus7,Matrix([[a,b],[c,d]]))):

I am using different properties and even full properties , still can not find the solution equal to exact solution, but number of equations had already been more than number of variables? where is incorrect?

m5 := solve([AA[1,1]=0,AA[1,2]=0,AA[2,1]=0,AA[2,2]=0, a*b = 1, c*d = 1, conjugate(a*c)-b*d = 0,a*d-b*c=sqrt(3)*I],[a,b,c,d]);

m5 := solve([AA[1,1]=0,AA[1,2]=0,AA[2,1]=0,AA[2,2]=0, a*b = 1, c*d = 1, a*d-b*c=sqrt(3)*I],[a,b,c,d]);

m5 := solve([AA[1,1]=0,AA[1,2]=0,AA[2,1]=0,AA[2,2]=0, a*b = 1, c*d = 1, conjugate(a*c)-b*d = 0],[a,b,c,d]);

m5 := solve([AA[1,1]=0,AA[1,2]=0,AA[2,1]=0,AA[2,2]=0, a*b = 1, c*d = 1],[a,b,c,d]);

Solution: Matrix([[a,b],[c,d]]) should be
Jesus2 := [[1313319/2 (3439+1145 I sqrt(3))/((-2292+1313317 I sqrt(3)) (-1146+I sqrt(3))),1313319/2 (3439-1145 I sqrt(3))/((-2292-1313317 I sqrt(3)) (-1146-I sqrt(3)))],[-1/2 (-3942243+1311025 I sqrt(3))/(-2292+1313317 I sqrt(3)),-1/2 (-3942243-1311025 I sqrt(3))/(-2292-1313317 I sqrt(3))]];

i find this combination of equations has solution

m5 := solve([AA[1,1]=0,AA[1,2]=0,AA[2,1]=0,AA[2,2]=0, a*b = 1, c*d = 1, a*d-b*c=sqrt(3)*I],[a,b,c,d]);

but the solution is not Jesus2, i did not know what inside in solve function, it is like somewhere has evalf it and then change back to fraction, may be my guess is incorrect.

## @Kitonum i edit script and try diff...

i edit script and try differen length of variables list, but can not find transpose is Equivalent

how to do correctly?

with(LinearAlgebra);
with(combinat):
elementss := proc(AA)
local elements1:
elements1 := [op(indets(AA))];
elements1 := [op(elements1), op(indets(AA,float))];
elements1 := [op(elements1),op(indets(AA,constant))];
return elements1:
end proc:
IsEquivalent:=proc(obj1::Matrix, obj2::Matrix, var::list)
local P, S, i, result, SS;
uses combinat, LinearAlgebra;
P:=permute(var);
#print(P):
S:=[seq(subs(zip(`=`,var,p),obj2), p=P)];
#print(S):
SS := choose(S,2);
result := false:
for i from 1 to nops(SS) do
if `or`(seq(Equal(obj1,s), s=SS[i])) then
result := true:
end if:
od:
return result:
end proc:
A1 := Matrix([[777,x,x],[77,7,7],[2,y,y]]);
B1 := Transpose(A1);
finish := 0:
for la2 from nops(elementss(A1)) to 2 by -1 do
#print(choose(elementss(A1),la2));
elementbox := choose(elementss(A1),la2):
for la7 from 1 to nops(elementbox) do
if finish = 0 then
result := IsEquivalent(A1, B1, elementbox[la7]):
print(result):
if result = true then
finish := la2:
end if:
end if:
od:
od:

## @acer  i solved after tidy my code...

i solved after tidy my code

and succeed to verify that there are all one

i use fraction input and simplify output

confirmed that only fraction is exact, it can not use with evalf, evalf has rounding error

## @acer  i sent file to support of m...

i sent file to support of maple , phil

You can ask him to give you to look