Ask Your Question

Revision history [back]

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:

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

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

  • otherwise your matrix has rank 0 (never happen)

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 if $t \not= 0$2

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

  • otherwise your matrix has rank 0 (never happen)