page_title: Covariance matrix
hierarchical_section_title: Covariance matrix
caption_attribution_description: English: This displays the probability density function of a 2-dimensional Gaussian distribution, with correlation parameter = 0.50.
context_page_description: In probability theory and statistics, a covariance matrix is a square matrix giving the covariance between each pair of elements of a given random vector. In the matrix diagonal there are variances, i.e., the covariance of each element with itself.
  Intuitively, the covariance matrix generalizes the notion of variance to multiple dimensions. As an example, the variation in a collection of random points in two-dimensional space cannot be characterized fully by a single number, nor would the variances in the and directions contain all of the necessary information; a matrix would be necessary to fully characterize the two-dimensional variation.
  Because the covariance of the i-th random variable with itself is simply that random variable's variance, each element on the principal diagonal of the covariance matrix is the variance of one of the random variables. Because the covariance of the i-th random variable with the j-th one is the same thing as the covariance of the j-th random variable with the i-th random variable, every covariance matrix is symmetric. Also, every covariance matrix is positive semi-definite.
  The covariance matrix of a random vector is typically denoted by or.
context_section_description: In probability theory and statistics, a covariance matrix (also known as auto-covariance matrix, dispersion matrix, variance matrix, or variance–covariance matrix) is a square matrix giving the covariance between each pair of elements of a given random vector. In the matrix diagonal there are variances, i.e., the covariance of each element with itself.
  Intuitively, the covariance matrix generalizes the notion of variance to multiple dimensions. As an example, the variation in a collection of random points in two-dimensional space cannot be characterized fully by a single number, nor would the variances in the  and  directions contain all of the necessary information; a  matrix would be necessary to fully characterize the two-dimensional variation.
  Because the covariance of the i-th random variable with itself is simply that random variable's variance, each element on the principal diagonal of the covariance matrix is the variance of one of the random variables. Because the covariance of the i-th random variable with the j-th one is the same thing as the covariance of the j-th random variable with the i-th random variable, every covariance matrix is symmetric. Also, every covariance matrix is positive semi-definite.
  The covariance matrix of a random vector  is typically denoted by  or .
caption: A bivariate Gaussian probability density function centered at (0, 0), with covariance matrix given by 
    
      
        
          
            
              [
              
                
                  
                    1
                  
                  
                    0.5
                  
                
                
                  
                    0.5
                  
                  
                    1
                  
                
              
              ]
            
          
        
      
      {\displaystyle {\begin{bmatrix}1&0.5\\0.5&1\end{bmatrix}}}
exif: {}