Ask Your Question
2

More problems with general power of a matrix

asked 2018-06-06 16:12:15 +0100

Frank Zenter gravatar image

updated 2018-06-17 21:40:46 +0100

Even though in version 8.2 the code for the general power of a matrix has been improved (c.f. question 41622), it still doesn't work in some cases, as i.e. this singular, diagonalizable matrix

A=matrix(QQbar,3,3,[[-2,-8,-12],[1,4,4],[0,0,1]])
k=var('k')
A**k

shows.

Concerning the remark in trac ticket 25520: Why not defining $0^x=1$ for $x\in {\bf N}$, which seems reasonable, since the number of functions $\emptyset \to \emptyset$ is 1?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-06-06 20:42:14 +0100

tmonteil gravatar image

You are absolutely right, while being correct on positive integers, the expression is not correct when specialized to k=0:

sage: [B.subs(k=i) == A^i for i in range(20)]
[False,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True,
 True]
sage: B.subs(k=0)
[ -1  -4  -8]
[1/2   2   2]
[  0   0   1]

Thanks for reporting, it is now trac ticket 25520

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2018-06-06 16:12:15 +0100

Seen: 587 times

Last updated: Jun 17 '18