# Isposdef or isspd?

**URL:** https://discourse.julialang.org/t/isposdef-or-isspd/5660
**Category:** General Usage
**Created:** [August 31, 2017, 3:56pm UTC](https://discourse.julialang.org/t/isposdef-or-isspd/5660 "2017-08-31T15:56:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![MikaelSlevinsky](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mikaelslevinsky/32/38545_2.png) [@MikaelSlevinsky](https://discourse.julialang.org/u/MikaelSlevinsky)
#### Post date: [August 31, 2017, 3:56pm UTC](https://discourse.julialang.org/t/isposdef-or-isspd/5660/1 "2017-08-31T15:56:49Z")

</div>

The docs say:

```julia
help?> isposdef
search: isposdef isposdef!

  isposdef(A) -> Bool

  Test whether a matrix is positive definite.

     Example
    ≡≡≡≡≡≡≡≡≡

  julia> A = [1 2; 2 50]
  2×2 Array{Int64,2}:
   1 2
   2 50
  
  julia> isposdef(A)
  true

```

But the following matrix (c.f. [Wikipedia](https://en.wikipedia.org/wiki/Positive-definite_matrix#On_the_definition)) is not correctly identified as positive definite:

```julia
julia> M = [1 1;-1 1]
2×2 Array{Int64,2}:
  1 1
 -1 1

julia> isposdef(M)
false

```

There is some confusion in the literature about whether a positive definite matrix is also symmetric (or more generally Hermitian), but this could be clarified by introducing `isspd` (or some other name).

---

<div class="post-metadata">

### Author: ![antoine-levitt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/antoine-levitt/32/4008_2.png) [@antoine-levitt](https://discourse.julialang.org/u/antoine-levitt)
#### Post date: [August 31, 2017, 7:12pm UTC](https://discourse.julialang.org/t/isposdef-or-isspd/5660/2 "2017-08-31T19:12:27Z")

</div>

The main question is, what would this be useful for? SPD matrices have a whole branch of LAPACK dedicated to them. Not sure non-symmetric positive matrices have any nice properties that could be used for algorithms?
