Processing math: 100%
Ask Your Question
1

transformation matrix for variable matrix of given jordan type

asked 6 years ago

anonymous user

Anonymous

updated 6 years ago

related: question/10488/why-does-jordan_form-not-work-over-inexact-rings/

I have, say, a nilpotent uppertriangular matrix A, with variable entries, and of a given Jordan type, J (block type λ). I would like to know the transformation matrix g such that gAg1=J.

How do I tell sage my input has a given Jordan type?

My idea is to compute A.jordan_form(transformation=True) in the quotient ring of the variable entries, given λ. This requires my figuring out the relations imposed by the given Jordan type, itself not an easy task.

I would like to know if what I want is already implemented somewhere in Sage, or if there is a better way to implement it than what I propose.

Preview: (hide)

Comments

Can you give a more explicit example?

rburing gravatar imagerburing ( 6 years ago )
1

Sure. Say I have an arbitrary uppertriangular matrix of Jordan type (2,1).

A=(0A0A100A2000)

By default J_d, T_d = A.jordan_form(transformation=True) gives

Jd=(010001000)Td=(A0A2A100A20001)

However, I expect J=(010000000)

In this case, I know that A2 must be zero for A to have Jordan type (2,1) so I let A=A|A2=0 and do J, T = A'.jordan_form(transformation=True) getting the desired

T=(A00001100A0A1)

anne gravatar imageanne ( 6 years ago )
1

In general, the constraints may be more complicated than setting some entries to zero. Either way, I want Sage to figure out those constraints for me, and solve something like gAg1=J for a g, given variable A and fixed J.

If I try A.jordan_form() in a quotient ring, I get a NotImplementedError :(

anne gravatar imageanne ( 6 years ago )

An alternative approach is to write A=g1Jg with g symbolic, and solve for g such that A is strictly upper triangular (n(n+1)/2 polynomial equations for the n2 entries of g). Would that suffice, or not? What quotient ring did you want to work in?

rburing gravatar imagerburing ( 6 years ago )
1

Yes, it might. How do I do it, exactly?

I would work in the ring R/I, where R is the polynomial ring generated by matrix coefficients, and I is the ideal of the Jordan form. For instance, if I have a 5 by 5 matrix A of type (3,2) then

  • rank A = 3 would be encoded by adding all 4 by 4 minors of A to I
  • rank A^2 = 1 would be encoded by adding all 2 by 2 minors of A^2 to I
  • and finally rank A^3 = 0 would be encoded by adding coefficients of A^3 to I
anne gravatar imageanne ( 6 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 6 years ago

rburing gravatar image

updated 6 years ago

We can set up the problem as follows:

n = 3
jordan_type = (2,1)

assert sum(jordan_type) == n
import itertools
A_coeff_names = {(i,j) : 'a_{}_{}'.format(i,j) for (i,j) in itertools.combinations(range(n),2)}
R = PolynomialRing(QQ, names=A_coeff_names.values())
A_coeff = {idx : R(A_coeff_names[idx]) for idx in A_coeff_names}
A = Matrix(R, n, A_coeff)
J = block_diagonal_matrix([jordan_block(0, s) for s in jordan_type], subdivide=False)

A necessary condition for gAg1=J is that the rank of Ak equals the rank of Jk for 1k<n.

(And since A has all zeros as eigenvalues, this will give the right Jordan type.)

In particular it is necessary that the (rank(Jk)+1)-minors of Ak vanish; these are polynomial equations upon the coefficients of A:

A_coeff_eqns = []
J_power = identity_matrix(QQ, n)
A_power = identity_matrix(R, n)
for k in range(n):
    r = J_power.rank()
    # need (r+1) x (r+1) minors to vanish
    A_coeff_eqns.extend([eqn for eqn in A_power.minors(r+1) if eqn != 0])
    J_power *= J
    A_power *= A

We can solve these equations symbolically, substitute a solution into A, change to an exact ring (the fraction field of the polynomial ring in the new variables), calculate the Jordan form (to be sure), and change the names of the variables back to the originals where possible:

A_coeff_symb = map(SR, A_coeff_names.values())
A_coeff_eqns_symb = map(SR, A_coeff_eqns)
for sol in solve(A_coeff_eqns_symb, A_coeff_symb):
    # substitute symbolic solution
    A_new = A.change_ring(SR).apply_map(lambda x: x.subs(sol))
    A_new_vars = list(set(sum([list(x.variables()) for x in A_new.list()], [])))
    # change ring to fraction field of polynomial ring in the new variables
    A_new_ring = PolynomialRing(QQ, names=A_new_vars).fraction_field()
    A_new_rat = A_new.change_ring(A_new_ring)
    if A_new_rat.jordan_form(subdivide=False) != J:
        continue
    # change names of variables back to the originals where possible
    A_final_subs = {A_new_rat[i,j] : A_coeff[(i,j)] for (i,j) in A_coeff if A_new_rat[i,j] in A_new_vars}
    A_final = A_new_rat.apply_map(lambda x: x.subs(A_final_subs))
    print A_final
    print 
    print A_final.jordan_form(subdivide=False, transformation=True)[1]
    print
    print '---'
    print

Output:

[    0 a_0_1 a_0_2]
[    0     0     0]
[    0     0     0]

[         a_0_1              0              0]
[             0              1              1]
[             0              0 a_0_1/(-a_0_2)]

---

[    0     0 a_0_2]
[    0     0 a_1_2]
[    0     0     0]

[a_0_2     0     1]
[a_1_2     0     0]
[    0     1     0]

---

Beware that this assumes Sage can solve the polynomial equations symbolically, which may not be true for large n. To give Sage an easier time (though the solutions may become less pretty), you can replace the list of equations by a Groebner basis for the same ideal:

A_coeff_eqns = R.ideal(A_coeff_eqns).groebner_basis()
Preview: (hide)
link

Comments

1

Thanks very much!

anne gravatar imageanne ( 6 years ago )

You're welcome! :)

rburing gravatar imagerburing ( 6 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 6 years ago

Seen: 724 times

Last updated: Mar 09 '19