Macaulay2 » Documentation
Packages » Polyhedra :: affinePreimage(Matrix,Cone,Matrix)
next | previous | forward | backward | up | index | toc

# affinePreimage(Matrix,Cone,Matrix) -- computes the affine preimage of a cone

- Function: affinePreimage
- Usage:
    `C1 = affinePreimage(A,C,b)`
    `C1 = affinePreimage(A,C)`
    `C1 = affinePreimage(C,b)`
- Inputs:
  - A, a matrix, with entries in ZZ or QQ
  - C, a convex rational cone
  - b, a matrix, with entries in ZZ or QQ and only one column representing a vector
- Outputs:
  - C1, a convex polyhedron, of class Cone or Polyhedron

## Description

A must be a matrix from some source space to the ambient space of C and b must be a vector in that ambient space, i.e. the number of rows of A must equal the ambient dimension of C and the number of rows of b. affinePreimage then computes the polyhedron {q | (A*q)+b in C} or the cone {q | (A*q) in C} if b is 0 or omitted. If A is omitted then it is set to identity.

For example, consider the following three dimensional cone:

    i1 : C = coneFromVData matrix {{1,2,3},{3,1,2},{2,3,1}}

    o1 = C

    o1 : Cone

We can look at its preimage under the following map:

    i2 : A = matrix  {{-5,7,1},{1,-5,7},{7,1,-5}}

    o2 = | -5 7  1  |
         | 1  -5 7  |
         | 7  1  -5 |

                  3       3
    o2 : Matrix ZZ  <-- ZZ

    i3 : C1 = affinePreimage(A,C)

    o3 = C1

    o3 : Cone

    i4 : rays C1

    o4 = | 13 13 10 |
         | 13 10 13 |
         | 10 13 13 |

                  3       3
    o4 : Matrix ZZ  <-- ZZ

## Ways to use this method:

- `affinePreimage(Cone,Matrix)`
- `affinePreimage(Matrix,Cone)`
- affinePreimage(Matrix,Cone,Matrix) -- computes the affine preimage of a cone

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Polyhedra/documentation/old_documentation.m2:2431:0.