# Matrix-variate Distributions

*Matrix-variate distributions* are the distributions whose variate forms are `Matrixvariate`

(*i.e* each sample is a matrix). Abstract types for matrix-variate distributions:

## Common Interface

Both distributions implement the same set of methods:

```
size(::MatrixDistribution)
length(::MatrixDistribution)
mean(::MatrixDistribution)
pdf{T<:Real}(d::MatrixDistribution, x::AbstractMatrix{T})
logpdf{T<:Real}(d::MatrixDistribution, x::AbstractMatrix{T})
rand(::MatrixDistribution, ::Int)
```

## Distributions

`Distributions.Wishart`

— Type.`Wishart(nu, S)`

The Wishart distribution is a multidimensional generalization of the Chi-square distribution, which is characterized by a degree of freedom ν, and a base matrix S.

`Distributions.InverseWishart`

— Type.`InverseWishart(nu, P)`

The Inverse Wishart distribution is usually used as the conjugate prior for the covariance matrix of a multivariate normal distribution, which is characterized by a degree of freedom ν, and a base matrix Φ.

## Internal Methods (for creating your own matrix-variate distributions)

`Distributions._logpdf`

— Method.`_logpdf(d::MatrixDistribution, x::AbstractArray)`

Evaluate logarithm of pdf value for a given sample `x`

. This function need not perform dimension checking.