# How to find dimesion of a polyhedron

**URL:** <https://discourse.julialang.org/t/how-to-find-dimesion-of-a-polyhedron/72383>\
**Category:** Optimization (Mathematical)\
**Tags:** linearalgebra, combinatorics\
**Created:** [December 1, 2021, 3:10pm UTC](https://discourse.julialang.org/t/how-to-find-dimesion-of-a-polyhedron/72383 "2021-12-01T15:10:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![XLVII](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xlvii/32/37099_2.png) [@XLVII](https://discourse.julialang.org/u/XLVII)\
**Post date:** [December 1, 2021, 3:10pm UTC](https://discourse.julialang.org/t/how-to-find-dimesion-of-a-polyhedron/72383/1 "2021-12-01T15:10:38Z")

</div>

K = polyhedron(vrep([Ray([0.0,0.0,1.0])] )) let say we have K polyhedron

is there any function like dim(k) which give the dimension of k  
if no how to find dimesion?

using LinearAlgebra  
using Combinatorics  
using Polyhedra  
import CDDLib

these are the libraries I use

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [December 1, 2021, 3:24pm UTC](https://discourse.julialang.org/t/how-to-find-dimesion-of-a-polyhedron/72383/2 "2021-12-01T15:24:48Z")

</div>

It helps if you can specify which package you are using. Many packages define polyhedrons.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [December 1, 2021, 4:36pm UTC](https://discourse.julialang.org/t/how-to-find-dimesion-of-a-polyhedron/72383/3 "2021-12-01T16:36:14Z")

</div>

> [@XLVII](#):
>
> using Polyhedra

[Polyhedra.dim()](https://juliapolyhedra.github.io/Polyhedra.jl/dev/redundancy/#Polyhedra.dim) ?
