ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 05 Jan 2017 13:29:36 -0600identity matrixhttp://ask.sagemath.org/question/36195/identity-matrix/The square root of -1 is represented by I (as well as the usual i). The identity matrix of size n
is represented by identity_matrix(n). It seems to me that a better choice would be I(n), but
that isn't there. Why is happening here?Thu, 05 Jan 2017 12:47:54 -0600http://ask.sagemath.org/question/36195/identity-matrix/Answer by nbruin for <p>The square root of -1 is represented by I (as well as the usual i). The identity matrix of size n
is represented by identity_matrix(n). It seems to me that a better choice would be I(n), but
that isn't there. Why is happening here?</p>
http://ask.sagemath.org/question/36195/identity-matrix/?answer=36196#post-id-36196There are many notions and only a limited number of symbols. Symbols have different meanings in in different areas of mathematics, but in a computer algebra system a symbol can only be bound to one object at a time. I expect that `i is I` was introduced because of compatibility with other packages, and because "i" gets used as a counting variable very often, so is rather unsuitable as a symbol representing sqrt(-1).
If you want to use `I(n)` you can by setting `I=identity_matrix` at the start of your session (or even in your startup file `.sage/init.sage`). Just make sure to include that binding whenever you share code with other people who might not use it by default.Thu, 05 Jan 2017 13:29:36 -0600http://ask.sagemath.org/question/36195/identity-matrix/?answer=36196#post-id-36196