gives the correlation between the vectors v and w.


gives the cross-correlation matrix for the matrices a and b.


gives the auto-correlation matrix for observations in matrix a.


gives the correlation matrix for the multivariate symbolic distribution dist.


gives the (i,j)^(th) correlation for the multivariate symbolic distribution dist.



open allclose all

Basic Examples  (3)

Correlation between two vectors:

Real values:

Correlation matrix for a matrix:

Real values:

Correlation matrix for two matrices:

Real values:

Scope  (12)

Data  (6)

Exact input yields exact output:

Approximate input yields approximate output:

Correlation between vectors of complexes:

Works with large arrays:

A structured array can be used (see the guide):

Find the correlation for data involving quantities:

Distributions and Processes  (6)

Correlation for a continuous multivariate distribution:

Correlation for a discrete multivariate distribution:

Correlation controls the orientation and sharpness of a multivariate probability distribution:

Correlation for derived distributions:

Data distribution:

Correlation matrix for a random process at times s and t:

Correlation matrix for TemporalData at times and :

Applications  (3)

Compute the correlation of two financial time series:

Correlation can be used to measure linear association:

Correlation can only detect monotonic relationships:

HoeffdingD can be used to detect a variety of dependence structures:

Properties & Relations  (7)

The correlation matrix is symmetric and positive semidefinite:

A correlation matrix is a covariance matrix scaled by standard deviations:

Correlation and AbsoluteCorrelation agree for zero mean and unit marginal variances:

SpearmanRho is Correlation applied to ranks:

CorrelationFunction for a process is the off-diagonal entry in the correlation matrix:

Correlation and Covariance are the same for standardized vectors:

The diagonal elements of a correlation matrix are equal to 1:

Wolfram Research (2007), Correlation, Wolfram Language function, (updated 2023).


Wolfram Research (2007), Correlation, Wolfram Language function, (updated 2023).


Wolfram Language. 2007. "Correlation." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023.


Wolfram Language. (2007). Correlation. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_correlation, author="Wolfram Research", title="{Correlation}", year="2023", howpublished="\url{}", note=[Accessed: 24-April-2024 ]}


@online{reference.wolfram_2024_correlation, organization={Wolfram Research}, title={Correlation}, year={2023}, url={}, note=[Accessed: 24-April-2024 ]}