[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-math] Identity Matrix
From: |
Ralf Hemmecke |
Subject: |
Re: [Axiom-math] Identity Matrix |
Date: |
Mon, 27 Aug 2018 09:49:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
If you use SquareMatrix, then it is clear, what the identity matrix is,
namely 1. So one can just create such a matrix and then convert it to
the generic Matrix domain. But maybe, you actually like SquareMatrix
even better.
(1) -> 1$SquareMatrix(3,Integer)::Matrix(Integer)
+1 0 0+
| |
(1) |0 1 0|
| |
+0 0 1+
Type:
Matrix(Integer)
Ralf
On 08/11/2018 07:24 PM, address@hidden wrote:
> Hi,
>
> is there a command / "shortcut" for creating the identity matrix of a certain
> size?
> Or is it necessary to use the matrix()-command and set all the values on the
> diagoanl to one and all others to zero?
>
> Would be much easier, if there is something like identitiymatrix(3),
> which would make a 3x3 identity-matrix.
>
> any ideas?
>
> TIA,
> pan.
>
> _______________________________________________
> Axiom-math mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/axiom-math
>