# Pivoted Cholesky: Why is rank a private field/property?

**URL:** https://discourse.julialang.org/t/pivoted-cholesky-why-is-rank-a-private-field-property/122971
**Category:** Numerics
**Tags:** linearalgebra
**Created:** [November 22, 2024, 6:24pm UTC](https://discourse.julialang.org/t/pivoted-cholesky-why-is-rank-a-private-field-property/122971 "2024-11-22T18:24:35Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [November 22, 2024, 7:06pm UTC](https://discourse.julialang.org/t/pivoted-cholesky-why-is-rank-a-private-field-property/122971/2 "2024-11-22T19:06:39Z")

</div>

> [@ajinkya-k](#):
>
> My question: Why is the rank a private field for the pivoted cholesky?

This is the `rank` return value of the [LAPACK `pstrf` function](https://www.netlib.org/lapack/explore-html-3.6.1/dd/dad/dpstrf_8f_a31cdc13a7f4ad687f4aefebff870e1cc.html) (Cholesky with complete pivoting).

I’m not sure how reliable a rank estimate this is? LU can be an unreliable way to compute rank, even with complete pivoting (see e.g. the [links in this discussion](https://discourse.julialang.org/t/how-to-find-the-linearly-independent-columns-rows-of-a-matrix/109772)), but I’m not sure if complete-pivoted Cholesky has the same issues.

In any case, it would be good if you could simply call `rank(Achol)` on the `CholeskyPivoted` object to access this, similar to how one can call `rank` [on the pivoted QR factorization](https://github.com/JuliaLang/julia/pull/54283) to get a QR-based rank estimate. Want to file an issue, or better yet a PR?

---

_[View the full topic](https://discourse.julialang.org/t/pivoted-cholesky-why-is-rank-a-private-field-property/122971)._
