# Rank is wrong for Rational matrices

**URL:** https://discourse.julialang.org/t/rank-is-wrong-for-rational-matrices/19380
**Category:** General Usage
**Created:** [January 8, 2019, 10:46am UTC](https://discourse.julialang.org/t/rank-is-wrong-for-rational-matrices/19380 "2019-01-08T10:46:30Z")
**Posts on this page:** 1
**Showing post:** 19

<div class="post-metadata">

### Author: ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)
#### Post date: [January 10, 2019, 10:45am UTC](https://discourse.julialang.org/t/rank-is-wrong-for-rational-matrices/19380/19 "2019-01-10T10:45:10Z")

</div>

> [@foobar\_lv2](#):
>
> It appears like the same problem applies to integer matrices:

You could try Hermite Normal Form

> **[Hermite normal form](https://en.m.wikipedia.org/wiki/Hermite_normal_form)**
>
> In linear algebra, the Hermite normal form is an analogue of reduced echelon form for matrices over the integers Z. Just as reduced echelon form can be used to solve problems about the solution to the linear system Ax=b where x is in Rn, the Hermite normal form can solve problems about the solution to the linear system Ax=b where this time x is restricted to have integer coordinates only. Other applications of the Hermite normal form include integer programming, cryptography, and abstract a Vario...

The Hecke.jl library supports it

[https://github.com/thofma/Hecke.jl/search?&q=hnf](https://github.com/thofma/Hecke.jl/search?&q=hnf)

As stated in the references [http://nemocas.org/links.html](http://nemocas.org/links.html)

---

_[View the full topic](https://discourse.julialang.org/t/rank-is-wrong-for-rational-matrices/19380)._
