Finding the matrix of an isometry: mkisom

### 5.51.2 Finding the matrix of an isometry: mkisom

The mkisom command finds the matrix of an isometry given the characteristic elements.

- mkisom takes two arguments:
  - char, the characteristic element (for isometries of ℝ2 or a list of characteristic elements (for isometries of ℝ3.

    For isometries of ℝ2, char will be the angle of rotation for direct isometries or a vector determining the line (through the origin) of reflection for an indirect symmetry.

    For isometries of ℝ3, char will be the list consisting of the axis direction and angle of rotation for a direct isometry or a vector normal to the plane of reflection for an indirect isometry.

  - n, either +1 for a direct isometry or -1 an indirect isometry.
- mkisom(char,n) returns a matrix of the corresponding isometry.

#### Examples

- Input:
  mkisom([[-1,2,-1],pi],1)
  Output (the matrix of the rotation about axis [−1,2,−1] of angle π):

  ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
  − |
  2
  3
  − |
  2
  3
  1
  3
  − |
  2
  3
  1
  3
  − |
  2
  3
  1
  3
  − |
  2
  3
  − |
  2
  3
  | ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦

- Input:
  mkisom([pi],-1)
  Output (the matrix of the symmetry with respect to O):

  ⎡ ⎢ ⎢ ⎣ |
  −1 | 0 | 0
  0 | −1 | 0
  0 | 0 | −1
  | ⎤ ⎥ ⎥ ⎦

- Input:
  mkisom([1,1,1],-1)
  Output (the matrix of the symmetry with respect to the plane x+y+z=0):

  ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
  1
  3
  − |
  2
  3
  − |
  2
  3
  − |
  2
  3
  1
  3
  − |
  2
  3
  − |
  2
  3
  − |
  2
  3
  1
  3
  | ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦

- Input:
  mkisom([[1,1,1],pi/3],-1)
  Output (the matrix of the product of a rotation of axis [1,1,1] and angle π/3 and of a symmetry with respect to the plane x+y+z=0):

  ⎡ ⎢ ⎢ ⎣ |
  0 | −1 | 0
  0 | 0 | −1
  −1 | 0 | 0
  | ⎤ ⎥ ⎥ ⎦

- Input:
  mkisom(pi/2,1)
  Output (the matrix of the plane rotation of angle π/2):

  ⎡ ⎢ ⎣ |
  0 | −1
  1 | 0
  | ⎤ ⎥ ⎦

- Input:
  mkisom([1,2],-1)
  Output (matrix of the plane symmetry with respect to the line of equation x+2y=0):

  ⎡ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎣ |
  3
  5
  − |
  4
  5
  − |
  4
  5
  − |
  3
  5
  | ⎤ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎦