🧠
AI
  • Artificial Intelligence
  • Intuitive Maths behind AI
    • Probability
    • Information Theory
    • Linear Algebra
    • Calculus
  • Overview
  • Research Ideas and Philosophy
  • Basic Principles
  • Information Theory
    • Entropy
    • Log Probability
  • Probability & Statistics
    • Random Variables
    • Probability
      • Probablistic Equations
      • Bayes Theorem
      • Probability Distributions & Processes
    • Statistics
      • Measures
      • Z-Scores
      • Covariance and Correlation
      • Correlation vs Dependance
    • Mahalanobis vs Chi-Squared
    • Uncertainty
    • Statistical Inference
      • Graphical Models
      • Estimator vs Parameter
      • Estimation
      • Bayesian/Probabilistic Inference
        • Probabilistic Modelling
        • Problems of Bayesian Inference
        • Conjugate Priors
        • Dirichlet Distribution/Process
        • Posterior Predictive Distribution
      • Sampling-Based Inference
    • Sampling
      • Rejection Sampling
      • Reservoir Sampling
      • Thompson Sampling
    • Bayesian Inference
    • Regression
    • Markov
    • Monte Carlo
      • Monte Carlo Estimators
      • Importance Sampling
    • Kernel Density Estimation
    • Gaussian Processes
    • Gaussian Soap Bubble
  • Linear Algebra
    • Vector Space and Matrices
    • Geometry of System of Linear Equations
    • Determinants
    • Transformations
    • Geometrical Representation
    • Positive (Semi)Definite Matrices
    • Matrix Interpretation
    • Dot Product as Linear Transformation and Duality of Vector-Linear Transformation
    • Norms
    • Linear Least Square
    • Matrix Decomposition
      • QR Decomposition
      • Cholesky Decomposition
      • Eigen Value Decomposition
      • SVD - Singular Value Decomposition
    • Matrix Inversion
    • Matrix Calculus
    • Matrix Cookbook
    • Distributed Matrix Algebra
    • High Dimensional Spaces
  • Optimization
    • Derivatives
      • Partial Derivative
      • Directional Derivative
      • Gradient
      • Jacobian
    • Regularization
    • Gradient Descent
    • Newton's Method
    • Gauss-Newton
    • Levenberg–Marquardt
    • Conjugate Gradient
    • Implicit Function Theorem for optimization
    • Lagrange Multiplier
    • Powell's dog leg
    • Laplace Approximation
    • Cross Entropy Method
    • Implicit Function Theorem
  • Statistical Learning Theory
    • Expectation Maximization
  • Machine Learning
    • Clustering
    • Bias Variance Trade-off
  • Deep Learning
    • PreProcessing
    • Convolution Arithmetic
    • Regularization
    • Optimizers
    • Loss function
    • Activation Functions
    • Automatic Differentiation
    • Softmax Classifier and Cross Entropy
    • Normalization
    • Batch Normalization
    • Variational Inference
    • VAE: Variational Auto-Encoders
    • Generative vs Discriminative
      • Generative Modelling
    • Making GANs train
    • Dimensionality of Layer Vs Number of Layers
    • Deep learning techniques
    • Dilated Convolutions
    • Non-Maximum Suppression
    • Hard Negative Mining
    • Mean Average Precision
    • Fine Tuning or Transfer Learning
    • Hyper-parameter Tuning
  • Bayesian Deep Learning
    • Probabilistic View
    • Uncertainty
    • Variational Inference for Bayesian Neural Network
  • Reinforcement Learning
    • General
    • Multi-armed Bandit
    • Imitation Learning
    • MDP Equations
    • Solving MDP with known Model
    • Value Iteration
    • Model Free Prediction and Control
    • Off Policy vs On Policy
    • Control & Planning from RL perspective
    • Deep Reinforcement Learning
      • Value Function Approximation
      • Policy Gradient
        • Algorithms
    • Multi Agent Reinforcement Learning
    • Reinforcement Learning - Sutton and Barto
      • Chapter 3: Finite Markov Decision Processes
      • Chapter 4: Dynamic Programming
    • MBRL
  • Transformers
    • Tokenziation
    • Embedding
      • Word Embedding
      • Positional Encoding
    • Encoder
    • Decoder
    • Multi-head Attention Block
    • Time Complexities of Self-Attention
    • KV Cache
    • Multi-head Latent Attention
    • Speculative Decoding
    • Flash Attention
    • Metrics
  • LLMs
    • LLM Techniques
    • LLM Post-training
    • Inference/Test Time Scaling
    • Reasoning Models
    • Reward Hacking
  • Diffusion Models
    • ImageGen
  • Distributed Training
  • State Space Models
  • RLHF
  • Robotics
    • Kalman Filter
    • Unscented Kalman Filter
  • Game Theory and ML
    • 1st Lecture - 19/01
    • Lecture 2 - 22/01
    • Lecture 4: Optimization
  • Continual Learning
    • Lecture - 21/01
    • iCaRL: Incremental Classifier and Representation Learning
    • Variational Continual Learning
  • Computer Vision
    • Hough Transform
    • Projective Geometry
      • Extrinsic and Intrinsic Parameters
      • Image Rectification
    • Tracking
    • Optical Flow
    • Harris Corner
    • Others
  • Papers
    • To Be Read
    • Probabilistic Object Detection and Uncertainty Estimation
      • BayesOD
      • Leveraging Heteroscedastic Aleatoric Uncertainties for Robust Real-Time LiDAR 3D Object Detection
      • Gaussian YOLOv3
      • Dropout Sampling for Robust Object Detection in Open-Set Condition
      • *Sampling Free Epistemic Uncertainty Estimation using Approximated Variance Propagation
      • Multi-Task Learning Using Uncertainty to Weigh Losses for Scene Geometry and Semantics
      • Can We Trust You? On Calibration of Probabilistic Object Detector for Autonomous Driving
    • Object Detection
    • Temporal Fusion in Object Detection/ Video Object Detection
    • An intriguing failing of convolutional neural networks and the CoordConv solution
    • A Neural Algorithm of Artistic Style - A.Gatys
  • Deep Learning Book
    • Chapter 4: Optimization
    • Chapter 5: Machine Learning Basics
    • Chapter 6: Deep FeedForward Networks
  • Python
    • Decorators
    • Packages
      • Pip
    • Gotchas
    • Async functions
  • Computer Science
  • TensorFlow
  • Pytorch
    • RNN/LSTM in Pytorch
    • Dataset/ Data loader
    • Resuming/Loading Saved model
  • Programming
    • Unit Testing
    • How to write code
  • General Software Engineering
    • SSH tunneling and Ngrok
  • How To Do Research
  • Resources
  • ROS for python3
  • Kitti
Powered by GitBook
On this page
  • Symmetric Matrix
  • Positive Definite or Positive Semi-definite
  • PSD from the lens of dot-product
  • Properties of PD or PSD matrices
  • PSD Matrices defining Ellipsoid
  • Resrouces
  • Full Rank Matrix
  • Resources
  1. Linear Algebra

Positive (Semi)Definite Matrices

PreviousGeometrical RepresentationNextMatrix Interpretation

Last updated 11 months ago

Symmetric Matrix

When the matrix entries are the same across the diagonal.

A=ATA = A^TA=AT

Positive Definite or Positive Semi-definite

It's defined for symmetric matrix MMM.

An n×nn\times nn×n symmetric real matrix MMM is said to be positive-definite if xTMx>0x^TMx > 0xTMx>0for all non-zero x\mathbf {x} xin Rn\mathbb {R} ^{n}Rn. Formally

Positive Semi-Definite

An n×nn\times nn×n symmetric real matrix MMM is said to be positive semi-definite if xTMX≥0x^TMX \geq 0xTMX≥0 for all non-zero x\mathbf {x} xin Rn\mathbb {R} ^{n}Rn.

What does positive definite mean? It's similar to saying for example in one dimensional that kx2kx^2kx2should be positive ∀x\forall x∀xwhich means k>0k>0k>0. Similarly, for higher dimensions, to get the higher dimensional parabola always positive we need a positive definite matrix.

PSD from the lens of dot-product

Let's see

We can consider xTAxx^TAxxTAx as dot product (xT)Ax(x^T)Ax(xT)Ax. Now PSD means (xT)(Ax)≥0(x^T)(Ax) \geq 0(xT)(Ax)≥0 which means xTx^TxT and AxAxAx form an acute angle between them i.e point in the same directoin. Hence, it means that AAA is a transformation that keeps AxAxAx in the same direction as xxx.

Properties of PD or PSD matrices

All the eigenvalues of a positive definite matrix are positive. A matrix is positive definite if it’s symmetric and all its eigenvalues are positive.

As established all the transformed vectors Ax are in same direction as x for positive dot product. Let's consider some eigen vector viv_ivi​with it's eigen value λi\lambda_iλi​. Now we know that Avi=λiviAv_i = \lambda_iv_iAvi​=λi​vi​ , so for (viT)(Avi)≥0  ⟹  viTλuvi≥0  ⟹  λi∣∣vi∣∣≥0  ⟹  λi≥0(v_i^T)(Av_i) \geq 0 \implies v_i^T\lambda_uv_i \geq 0 \implies \lambda_i ||v_i|| \geq 0 \implies \lambda_i \geq 0 (viT​)(Avi​)≥0⟹viT​λu​vi​≥0⟹λi​∣∣vi​∣∣≥0⟹λi​≥0

det(A)=∏n=1Nλn\text{det}(A) = \prod_{n=1}^N \lambda_ndet(A)=n=1∏N​λn​

So if all the λn\lambda_nλn​are positive, determinant will also be positive.

Decomposition

If AAA is Positive semi-definite if and only if it can be decomposed as follows:

A=BTBA = B^TBA=BTB

Also

A=LLTA = LL^TA=LLT

Where LLL is a lower triangular matrix. And this is called Cholesky decomposition.

PSD Matrices defining Ellipsoid

Let's say we have Q(x)=xTAxQ(x) = x^TAxQ(x)=xTAx, be a positive definite form. Then the set

{x∈Rn:Q(x)=c}\{x \in \mathbf R^n: Q(x)=c\}{x∈Rn:Q(x)=c}

where ccc is some constant. This set of points forms an ellipsoid.

Resrouces

Why does PSD matrices have to be symmetric?

Full Rank Matrix

A matrix is said to have full rank if its rank equals the largest possible for a matrix of the same dimensions, which is the lesser of the number of rows and columns.

Resources

  • Talks about multiple properties of PSD and also gives insight about Hessians of functions as they are PSD

The determinant of a positive definite matrix is always positive, so a positive definite matrix is always .

In , the rank of a A is the of the generated (or ) by its columns.This corresponds to the maximal number of columns of A. This, in turn, is identical to the dimension of the vector space spanned by its rows. Rank is thus a measure of the "" of the and encoded by A.

nonsingular
linear algebra
matrix
dimension
vector space
spanned
linearly independent
nondegenerateness
system of linear equations
linear transformation
Understanding Positive Definite Matrices
Very comprehensive study of PSD Matrices. Relating it to dot product, quadratic programming, and visualization.
What is a Positive Definite Matrix?Medium
Linear Algebra 101 — Part 8: Positive Definite MatrixMedium
Why do positive definite matrices have to be symmetric?Mathematics Stack Exchange
https://www.math.purdue.edu/~eremenko/dvi/lect4.9.pdf
Logo
Logo
Logo
Logo