### 5.51.1 Recognize an isometry : isom

isom takes as argument the matrix of a linear function in dimension 2 or 3.
isom returns :

- if the linear function is a direct isometry,
  the list of the characteristic elements of this isometry and +1,
- if the linear function is an indirect isometry,
  the list of the characteristic elements of this isometry and -1
- if the linear function is not an isometry,
  [0].

Input :

isom([[0,0,1],[0,1,0],[1,0,0]])

Output :

[[1,0,-1],-1]

which means that this isometry is a 3-d symmetry with respect to the plane x − z = 0.
Input :

isom(sqrt(2)/2*[[1,-1],[1,1]])

Output :

[pi/4,1]

Hence, this isometry is a 2-d rotation of angle π/4.
Input :

isom([[0,0,1],[0,1,0],[0,0,1]])

Output :

[0]

therefore this transformation is not an isometry.