# Check for positive semi-definiteness

**URL:** <https://community.freefem.org/t/check-for-positive-semi-definiteness/3426>\
**Category:** General Discussion\
**Created:** [August 11, 2024, 3:14pm UTC](https://community.freefem.org/t/check-for-positive-semi-definiteness/3426 "2024-08-11T15:14:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcvillaquira](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/jcvillaquira/32/2016_2.png) [@jcvillaquira](https://community.freefem.org/u/jcvillaquira)\
**Post date:** [August 11, 2024, 3:14pm UTC](https://community.freefem.org/t/check-for-positive-semi-definiteness/3426/1 "2024-08-11T15:14:44Z")

</div>

Hi,

I need to verify if a matrix is positive (semi)-definite, ideally without computing the eigenvalues. Is there a standard way?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [August 12, 2024, 3:05pm UTC](https://community.freefem.org/t/check-for-positive-semi-definiteness/3426/2 "2024-08-12T15:05:35Z")

</div>

I don’t know of any without computing the lowest eigenvalue.

---

<div class="post-metadata">

**Author:** ![jcvillaquira](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/jcvillaquira/32/2016_2.png) [@jcvillaquira](https://community.freefem.org/u/jcvillaquira)\
**Post date:** [August 12, 2024, 3:45pm UTC](https://community.freefem.org/t/check-for-positive-semi-definiteness/3426/3 "2024-08-12T15:45:42Z")

</div>

Sorry, can you elaborate on how one could do that. I read the documentation and it is not very clear to me.

---

<div class="post-metadata">

**Author:** ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)\
**Post date:** [August 12, 2024, 3:52pm UTC](https://community.freefem.org/t/check-for-positive-semi-definiteness/3426/4 "2024-08-12T15:52:30Z")

</div>

I forgot to ask whether your matrix is symmetric or not, but here is an example for Stokes equation [FreeFem-sources/examples/hpddm/stokes-2d-SLEPc.edp at 2b2052ae9ec86ae7f0048607b20084234e03858f · FreeFem/FreeFem-sources · GitHub](https://github.com/FreeFem/FreeFem-sources/blob/2b2052ae9ec86ae7f0048607b20084234e03858f/examples/hpddm/stokes-2d-SLEPc.edp#L74) (determining whether the FE pair is inf-sup stable using the lowest eigenvalue).
