v1=[3,1]
v2=[2,1]
S1=matrix([v1,v2])
S=transpose(S1)
D=matrix([[1,0],[0,4]])
A=S*D*S^(-1)
print A
[-5 18]
[-3 10]