# rank of matrices depending on parameters

Hi!

I have a question on how to treat objects depending with parameters.

For example, let M be a matrix depending on a parameter - call it t. The rank command just returns the generic rank. I would like to know the rank of the matrix, varying the parameter. In the example,

_ = var('t')
M = matrix([[t,0],[0,1]])
M.rank()


I would like to get: if t=0, the rank is 1; otherwise is 2. Is there any command for this in Sage? (I've heard about a "full solve" in Mathematica.)

edit retag close merge delete

Sort by » oldest newest most voted

There is no such command in Sage. But the rank is just obtain from conditions on the minors of the matrix.

sage: t = polygen(ZZ, 't')
sage: M = matrix([[t,0],[0,1]])
sage: M.minors(2)
[t]
sage: M.minors(1)
[t, 0, 0, 1]


In other words:

• if $t \not= 0$ your matrix has rank 2

• otherwise if $t \not= 0$ or $0 \not= 0$ or $1 \not= 0$ your matrix has rank 1

• otherwise your matrix has rank 0 (never happen)

more

2

Automatizing this in the general case (over the reals, in any dimension) with qepcad (a package to eliminate quantifiers in formulas involving polynomial inequalities, provided as an optional packaged in Sage by yours truly) could be a nice exercise :P