Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
PositiveDefiniteMatrixQ
  • See Also
    • PositiveSemidefiniteMatrixQ
    • NegativeDefiniteMatrixQ
    • NegativeSemidefiniteMatrixQ
    • HermitianMatrixQ
    • SymmetricMatrixQ
    • Eigenvalues
    • SquareMatrixQ
  • Related Guides
    • Matrix Predicates
    • Matrices and Linear Algebra
    • See Also
      • PositiveSemidefiniteMatrixQ
      • NegativeDefiniteMatrixQ
      • NegativeSemidefiniteMatrixQ
      • HermitianMatrixQ
      • SymmetricMatrixQ
      • Eigenvalues
      • SquareMatrixQ
    • Related Guides
      • Matrix Predicates
      • Matrices and Linear Algebra

PositiveDefiniteMatrixQ[m]

gives True if m is explicitly positive definite, and False otherwise.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Basic Uses  
Special Matrices  
Applications  
The Geometry and Algebra of Positive Definite Matrices  
Sources of Positive Definite Matrices  
Uses of Positive Definite Matrices  
Properties & Relations  
Possible Issues  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • PositiveSemidefiniteMatrixQ
    • NegativeDefiniteMatrixQ
    • NegativeSemidefiniteMatrixQ
    • HermitianMatrixQ
    • SymmetricMatrixQ
    • Eigenvalues
    • SquareMatrixQ
  • Related Guides
    • Matrix Predicates
    • Matrices and Linear Algebra
    • See Also
      • PositiveSemidefiniteMatrixQ
      • NegativeDefiniteMatrixQ
      • NegativeSemidefiniteMatrixQ
      • HermitianMatrixQ
      • SymmetricMatrixQ
      • Eigenvalues
      • SquareMatrixQ
    • Related Guides
      • Matrix Predicates
      • Matrices and Linear Algebra

PositiveDefiniteMatrixQ

PositiveDefiniteMatrixQ[m]

gives True if m is explicitly positive definite, and False otherwise.

Details

  • A matrix m is positive definite if Re[Conjugate[x].m.x]>0 for all nonzero vectors x. »
  • PositiveDefiniteMatrixQ works for symbolic as well as numerical matrices.

Examples

open all close all

Basic Examples  (2)

Test if a 2×2 real matrix is explicitly positive definite:

This means that the quadratic form for all vectors :

Visualize the values of the quadratic form:

Test if a 3×3 Hermitian matrix is positive definite:

Scope  (10)

Basic Uses  (6)

Test if a real machine-precision matrix is explicitly positive definite:

Test if a complex matrix is positive definite:

Test if an exact matrix is positive definite:

Use PositiveDefiniteMatrixQ with an arbitrary-precision matrix:

A random matrix is typically not positive definite:

Use PositiveDefiniteMatrixQ with a symbolic matrix:

The matrix becomes positive definite when b=-TemplateBox[{a}, Conjugate]:

PositiveDefiniteMatrixQ works efficiently with large numerical matrices:

Special Matrices  (4)

Use PositiveDefiniteMatrixQ with sparse matrices:

Use PositiveDefiniteMatrixQ with structured matrices:

The identity matrix is positive definite:

HilbertMatrix is positive definite:

Applications  (15)

The Geometry and Algebra of Positive Definite Matrices  (4)

Consider a real, positive definite 2×2 matrix and its associated real quadratic q=TemplateBox[{x}, Transpose].m.x:

Because is positive definite, the level sets are ellipses:

The plot of will be an upward-facing elliptic paraboloid:

For a real, positive definite matrix, the level sets are -ellipsoids:

A Hermitian matrix defines a real-valued quadratic form by q=TemplateBox[{x}, ConjugateTranspose].m.x:

If is positive definite, is positive for all nonzero inputs:

Visualize for real-valued inputs:

For a real-valued matrix , only the symmetric part determines whether is positive definite. Write with symmetric and antisymmetric:

As is real and symmetric TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], ., s, ., x}, )}}, Conjugate]=TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], ., s, ., x}, )}}, ConjugateTranspose]=TemplateBox[{x}, ConjugateTranspose].TemplateBox[{s}, ConjugateTranspose].TemplateBox[{{(, TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], )}}, ConjugateTranspose]=TemplateBox[{x}, ConjugateTranspose].s.x, meaning TemplateBox[{x}, ConjugateTranspose].s.x is purely real:

Similarly, as is real and antisymmetric TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], ., a, ., x}, )}}, Conjugate]=-TemplateBox[{x}, ConjugateTranspose].a.x, or TemplateBox[{x}, ConjugateTranspose].a.x is pure imaginary:

Thus, Re(TemplateBox[{x}, ConjugateTranspose].m.x)=TemplateBox[{x}, ConjugateTranspose].s.x, so is positive definite if and only if is:

For a complex-valued matrix , only the Hermitian part determines whether is positive definite. Write with Hermitian and antihermitian:

As is Hermitian, TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose], ., h, ., x}, )}}, Conjugate]=TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose], ., h, ., x}, )}}, ConjugateTranspose]=TemplateBox[{x}, ConjugateTranspose].TemplateBox[{h}, ConjugateTranspose].TemplateBox[{{(, TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], )}}, ConjugateTranspose]=TemplateBox[{x}, ConjugateTranspose].h.x, meaning TemplateBox[{x}, ConjugateTranspose].h.x is purely real:

Similarly, as is antihermitian, TemplateBox[{{(, {TemplateBox[{x}, ConjugateTranspose, SyntaxForm -> SuperscriptBox], ., a, ., x}, )}}, Conjugate]=-TemplateBox[{x}, ConjugateTranspose].a.x, or TemplateBox[{x}, ConjugateTranspose].a.x is pure imaginary:

Thus, Re(TemplateBox[{x}, ConjugateTranspose].m.x)=TemplateBox[{x}, ConjugateTranspose].h.x, so is positive definite if and only if is:

Sources of Positive Definite Matrices  (6)

A real nonsingular Covariance matrix is always symmetric and positive definite:

A complex one is Hermitian:

A Gram matrix is a symmetric matrix of dot products of vectors:

A Gram matrix is always positive definite if vectors are linearly independent:

Matrices drawn from WishartMatrixDistribution are real, symmetric and positive definite:

The squares of nonsingular Hermitian matrices are positive definite:

The Lehmer matrix is symmetric positive definite:

Its inverse is tridiagonal, which is also symmetric positive definite:

The matrix Min[i,j] is always symmetric positive definite:

Its inverse is a tridiagonal matrix, which is also symmetric positive definite:

Uses of Positive Definite Matrices  (5)

A positive definite, real symmetric matrix or metric defines an inner product by :

Verify that is in fact symmetric and positive definite:

Orthogonalize the standard basis of TemplateBox[{}, Reals]^n to find an orthonormal basis:

Confirm that this basis is orthonormal with respect to the inner product :

The moment of inertia tensor is the equivalent of mass for rotational motion. For example, kinetic energy is , with taking the place of the mass and angular velocity taking the place of linear velocity in the formula . can be represented by a positive definite symmetric matrix. Compute the moment of inertia for a tetrahedron with endpoints at the origin and positive coordinate axes:

Verify that the matrix is symmetric and positive definite:

Compute the kinetic energy if its angular velocity is :

As is positive definite, the kinetic energy is positive as long as is nonzero:

The second derivative test classifies critical points of a function as local minima if the Hessian is positive definite, local maxima if the Hessian is negative definite and saddle points if the Hessian is indefinite (the test fails if the Hessian is not one of these three types). Find the critical points of a function of two variables:

Compute the Hessian matrix :

The last of the three critical points is a saddle point:

The first two points are local minima:

Visualize the function. The red and blue points are minima and the green point is a saddle point:

Find the critical points of a function of three variables:

Compute the Hessian matrix of f:

The first two critical points are local minima:

The last three are saddle points:

For this function, any three of the critical points are linearly dependent, so they all lie in a single plane:

Compute the normal to that plane:

Visualize the function, with the minima green and the non-extreme critical points red:

CholeskyDecomposition works only with positive definite Hermitian matrices:

An upper triangular decomposition of is a matrix such that TemplateBox[{b}, ConjugateTranspose].b=m:

Properties & Relations  (15)

PositiveDefiniteMatrixQ[x] trivially returns False for any x that is not a matrix:

A matrix is positive definite if Re(TemplateBox[{x}, ConjugateTranspose].m.x)>0 for all nonzero vectors :

The sign of Im(TemplateBox[{x}, ConjugateTranspose].m.x) is irrelevant:

A real matrix is positive definite if and only if its symmetric part is positive definite:

In general, a matrix is positive definite if and only if its Hermitian part is positive definite:

A real symmetric matrix is positive definite if and only if its eigenvalues are all positive:

The statement is true of Hermitian matrices more generally:

A general matrix can have all positive eigenvalues without being positive definite:

Equally, a matrix can be positive definite without having positive eigenvalues:

The failure is due to the eigenvalues being complex:

The real part of the eigenvalues of a positive definite matrix must be positive:

A diagonal matrix is positive definite if and only if the diagonal elements have positive real part:

A positive definite matrix has the general form u.d.TemplateBox[{u}, ConjugateTranspose]+a with a diagonal positive definite :

Split into its Hermitian and antihermitian parts:

By the spectral theorem, can be unitarily diagonalized using JordanDecomposition:

The matrix is diagonal with positive diagonal entries:

The matrix is unitary:

Verify that m=u.d.TemplateBox[{u}, ConjugateTranspose]+a:

A matrix is positive definite if and only if is negative definite:

A positive definite matrix is always positive semidefinite:

It cannot be indefinite or negative semidefinite:

A positive definite matrix is invertible:

The inverse matrix is positive definite as well:

If is real and positive definite, there exists such that TemplateBox[{x}, Transpose].m.x>=delta ||x||^2 for any real vector :

Let be the smallest eigenvalue of the symmetric part of :

Verify that TemplateBox[{x}, Transpose].m.x>=delta ||x||^2:

The determinant and trace of a real, symmetric, positive definite matrix are positive:

This is also true of positive definite Hermitian matrices:

A real symmetric positive definite matrix has a uniquely defined square root such that :

The square root is positive definite and real symmetric:

A Hermitian positive definite matrix has a uniquely defined square root such that :

The square root is positive definite and Hermitian:

The Kronecker product of two symmetric positive definite matrices is symmetric and positive definite:

Replacing one matrix in the product by a negative definite one gives a negative definite matrix:

Possible Issues  (2)

Hilbert matrices are positive definite:

The smallest eigenvalue of m is too small to be certainly positive at machine precision:

At machine precision, the matrix m does not test as positive definite:

Using precision high enough to compute positive eigenvalues will give the correct answer:

PositiveDefiniteMatrixQ gives False unless it can prove a symbolic matrix is positive definite:

Using a combination of Eigenvalues and Reduce can give more precise results:

See Also

PositiveSemidefiniteMatrixQ  NegativeDefiniteMatrixQ  NegativeSemidefiniteMatrixQ  HermitianMatrixQ  SymmetricMatrixQ  Eigenvalues  SquareMatrixQ

Function Repository: RationalCholeskyDecomposition

Related Guides

    ▪
  • Matrix Predicates
  • ▪
  • Matrices and Linear Algebra

History

Introduced in 2007 (6.0)

Wolfram Research (2007), PositiveDefiniteMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/PositiveDefiniteMatrixQ.html.

Text

Wolfram Research (2007), PositiveDefiniteMatrixQ, Wolfram Language function, https://reference.wolfram.com/language/ref/PositiveDefiniteMatrixQ.html.

CMS

Wolfram Language. 2007. "PositiveDefiniteMatrixQ." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PositiveDefiniteMatrixQ.html.

APA

Wolfram Language. (2007). PositiveDefiniteMatrixQ. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PositiveDefiniteMatrixQ.html

BibTeX

@misc{reference.wolfram_2025_positivedefinitematrixq, author="Wolfram Research", title="{PositiveDefiniteMatrixQ}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/PositiveDefiniteMatrixQ.html}", note=[Accessed: 04-February-2026]}

BibLaTeX

@online{reference.wolfram_2025_positivedefinitematrixq, organization={Wolfram Research}, title={PositiveDefiniteMatrixQ}, year={2007}, url={https://reference.wolfram.com/language/ref/PositiveDefiniteMatrixQ.html}, note=[Accessed: 04-February-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English