Ask Your Question

rank of matrices depending on parameters

asked 2016-01-11 05:29:49 -0500

daniele gravatar image


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]])

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.)

Thanks in advance,

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-11 05:55:35 -0500

updated 2016-01-11 05:56:20 -0500

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) 
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)

edit flag offensive delete link more



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

tmonteil gravatar imagetmonteil ( 2016-01-11 06:23:10 -0500 )edit

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


Asked: 2016-01-11 05:29:49 -0500

Seen: 14,896 times

Last updated: Jan 11 '16