Ask Your Question
1

rank of matrices depending on parameters

asked 2016-01-11 12:29:49 +0100

daniele gravatar image

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

Thanks in advance,

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-01-11 12:55:35 +0100

vdelecroix gravatar image

updated 2016-01-11 12:56:20 +0100

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)

edit flag offensive delete link more

Comments

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

tmonteil gravatar imagetmonteil ( 2016-01-11 13:23:10 +0100 )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

Stats

Asked: 2016-01-11 12:29:49 +0100

Seen: 16,142 times

Last updated: Jan 11 '16