Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • System Modeler

    Multidomain modeling and simulation of complex systems

  • Compute ServicesUse with Mathematica and Wolfram|One
  • AI AccessUse with Mathematica and Wolfram|One
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Wolfram|Alpha

  • Wolfram|Alpha Website
  • Wolfram|Alpha APIs

AI Products

  • Wolfram AI Ecosystem
  • Wolfram Foundation Tool
  • Wolfram Cloud MCP
  • Wolfram Local MCP
  • Agent One API
  • CAG Component APIs

Core Technologies of Wolfram Products

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

Additional Deployment Options

  • Wolfram Cloud
  • Wolfram Web Engine
  • wolframscript
  • WSTPServer
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

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

Wolfram Consulting

Data Science, Finance & Business

  • Artificial Intelligence
  • Data Science
  • Healthcare
  • Real Estate

Engineering

  • Civil Engineering
  • Automotive Engineering
  • Sustainable Energy

Science & Technology

  • AgTech
  • Biosciences
  • Environmental Science
  • Food Science
  • Quantum Computation
  • Social and Behavioral Sciences

More Wolfram Solutions

Technology for Education

  • Research Universities
  • Colleges & Teaching Universities
  • High Schools
  • Resources for Students

Education Initiatives

  • Next-Gen EdTech
  • 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
  • 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
For AIs
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • System Modeler
    • Compute ServicesUse with Mathematica and Wolfram|One
    • AI AccessUse with Mathematica and Wolfram|One
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Wolfram|Alpha
      • Wolfram|Alpha Website
      • Wolfram|Alpha APIs
    • AI Products
      • Wolfram AI Ecosystem
      • Wolfram Foundation Tool
      • Wolfram Cloud MCP
      • Wolfram Local MCP
      • Agent One API
      • CAG Component APIs
    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • Linguistic Understanding
    • Additional Deployment Options
      • Wolfram Cloud
      • Wolfram Web Engine
      • wolframscript
      • WSTPServer
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions
    • Wolfram Consulting

    Data Science, Finance & Business

    • Artificial Intelligence
    • Data Science
    • Healthcare
    • Real Estate

    Engineering

    • Civil Engineering
    • Automotive Engineering
    • Sustainable Energy

    Science & Technology

    • AgTech
    • Biosciences
    • Environmental Science
    • Food Science
    • Quantum Computation
    • Social and Behavioral Sciences

    More Wolfram Solutions

    Technology for Education

    • Research Universities
    • Colleges & Teaching Universities
    • High Schools
    • Resources for Students

    Education Initiatives

    • Next-Gen EdTech
    • 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
      • 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
  • For AIs
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
MatrixTDistribution
  • See Also
    • MatrixNormalDistribution
    • MatrixPropertyDistribution
    • MultivariateTDistribution
    • WishartMatrixDistribution
    • InverseWishartMatrixDistribution
  • Related Guides
    • Matrix Distributions
    • See Also
      • MatrixNormalDistribution
      • MatrixPropertyDistribution
      • MultivariateTDistribution
      • WishartMatrixDistribution
      • InverseWishartMatrixDistribution
    • Related Guides
      • Matrix Distributions

MatrixTDistribution[Σrow,Σcol,ν]

represents zero mean matrix distribution with row covariance matrix Σrow, column covariance matrix Σcol, and degrees of freedom parameter ν.

MatrixTDistribution[μ,Σrow,Σcol,ν]

represents matrix distribution with mean matrix μ.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Properties & Relations  
Possible Issues  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • MatrixNormalDistribution
    • MatrixPropertyDistribution
    • MultivariateTDistribution
    • WishartMatrixDistribution
    • InverseWishartMatrixDistribution
  • Related Guides
    • Matrix Distributions
    • See Also
      • MatrixNormalDistribution
      • MatrixPropertyDistribution
      • MultivariateTDistribution
      • WishartMatrixDistribution
      • InverseWishartMatrixDistribution
    • Related Guides
      • Matrix Distributions

MatrixTDistribution

MatrixTDistribution[Σrow,Σcol,ν]

represents zero mean matrix distribution with row covariance matrix Σrow, column covariance matrix Σcol, and degrees of freedom parameter ν.

MatrixTDistribution[μ,Σrow,Σcol,ν]

represents matrix distribution with mean matrix μ.

Details

  • The probability density for a matrix of dimensions in a matrix distribution is proportional to with an identity matrix of length .
  • MatrixTDistribution[Σrow,Σcol,ν] is the distribution of MatrixNormalDistribution[Σ,Σcol] with sampled from InverseWishartMatrixDistribution[ν+n-1,Σrow].
  • MatrixTDistribution[μ,c Σrow,c-1 Σcol,ν] has the same distribution as MatrixTDistribution[μ,Σrow,Σcol,ν] for any positive real constant c.
  • The covariance matrices Σrow and Σcol can be any symmetric positive definite matrices of real numbers of dimensions {n,n} and {m,m}, respectively. The degrees of freedom parameter ν can be any positive number, and the mean matrix μ can be any matrix of real numbers of dimensions {n,m}.
  • MatrixTDistribution can be used with such functions as MatrixPropertyDistribution, EstimatedDistribution, and RandomVariate.

Examples

open all close all

Basic Examples  (2)

Sample from matrix distribution:

Wolfram Language code: sigR = {{3, 1}, {1, 4}}; sigC = {{1, -1 / 2}, {-1 / 2, 2}};
Wolfram Language code: RandomVariate[MatrixTDistribution[sigR, sigC, 3]]

Mean and variance:

Wolfram Language code: Mean[MatrixTDistribution[{{1, 2}, {3, 4}, {5, 6}}, DiagonalMatrix[{2, 1, 3}], {{2, 1}, {1, 3}}, 4]]//MatrixForm
Wolfram Language code: Variance[MatrixTDistribution[{{1, 2}, {3, 4}, {5, 6}}, DiagonalMatrix[{2, 1, 3}], {{2, 1}, {1, 3}}, 4]]//MatrixForm

Scope  (6)

Generate a single pseudorandom matrix:

Wolfram Language code: RandomVariate[MatrixTDistribution[{{1, 1 / 3}, {1 / 3, 1}}, IdentityMatrix[3], 2]]

Generate a single pseudorandom matrix with nonzero mean:

Wolfram Language code: RandomVariate[MatrixTDistribution[{{1, 2, 3}, {4, 5, 6}}, {{1, 1 / 3}, {1 / 3, 1}}, IdentityMatrix[3], 2]]

Generate a set of pseudorandom matrices:

Wolfram Language code: RandomVariate[MatrixTDistribution[{{1, 1 / 3}, {1 / 3, 1}}, IdentityMatrix[3], 2], 3]

Sample at extended precision:

Wolfram Language code: RandomVariate[MatrixTDistribution[{{1, 1 / 3}, {1 / 3, 1}}, IdentityMatrix[3], 2], WorkingPrecision -> 20]
Wolfram Language code: RandomVariate[MatrixTDistribution[{{1, 2, 3}, {4, 5, 6}}, {{1, 1 / 3}, {1 / 3, 1}}, IdentityMatrix[3], 2], WorkingPrecision -> 20]

Distribution parameters estimation:

Wolfram Language code: dist = MatrixTDistribution[{{3, 1}, {1, 2}}, ToeplitzMatrix[{4, 2, 1}], 4];sample = RandomVariate[dist, 10 ^ 3];

Estimate the distribution parameters from sample data:

Wolfram Language code: edist = EstimatedDistribution[sample, MatrixTDistribution[Array[row, {2, 2}], Array[col, {3, 3}], ν]]

Compare LogLikelihood for both distributions:

Wolfram Language code: LogLikelihood[#, sample]& /@ {edist, dist}

Skewness and kurtosis:

Wolfram Language code: Skewness[MatrixTDistribution[{{2, 1}, {1, 3}}, IdentityMatrix[3], 5]]//MatrixForm
Wolfram Language code: Kurtosis[MatrixTDistribution[{{2, 1}, {1, 3}}, IdentityMatrix[3], 5]]//MatrixForm

Probability density function:

Wolfram Language code: dist = MatrixTDistribution[IdentityMatrix[2], DiagonalMatrix[{2, 1}], 3];PDF[dist, {{1., 2.}, {3, 4.}}]

Plot PDF for a diagonal matrices:

Wolfram Language code: Plot3D[PDF[dist, DiagonalMatrix[{a, b}]], {a, -2, 2}, {b, -1, 1}]

Properties & Relations  (4)

Matrix t distribution is defined up to a positive multiplicative constant:

Wolfram Language code: sigr = {{2, 1}, {1, 4}}; sigc = ToeplitzMatrix[{9, 3, 1}]; 𝒟1 = MatrixTDistribution[sigr, sigc, 3];

Equivalent distribution with row and column scale matrices multiplied and divided by a positive constant:

Wolfram Language code: c = 2; 𝒟2 = MatrixTDistribution[c * sigr, sigc / c, 3];

Compute the PDF of the distributions at a random point:

Wolfram Language code: mat = RandomReal[{-10, 10}, {2, 3}]
Wolfram Language code: PDF[𝒟1, mat] == PDF[𝒟2, mat]

MatrixTDistribution[Σrow,Σcol,ν] is a parameter mixture of MatrixNormalDistribution[Σ,Σcol] with following InverseWishartMatrixDistribution[ν+n-1,Σrow]:

Wolfram Language code: ν = 3; n = 2; Σr = IdentityMatrix[n]; Σc = IdentityMatrix[3]; invW = InverseWishartMatrixDistribution[ν + n - 1, Σr];

Create a sample following the parameter mixture of MatrixNormalDistribution with InverseWishartMatrixDistribution:

Wolfram Language code: sampleSize = 10 ^ 3; sigmas = RandomVariate[invW, 10 ^ 3]; sample = Table[RandomVariate[MatrixNormalDistribution[s, Σc]], {s, sigmas}];

Fit the sample data to MatrixTDistribution:

Wolfram Language code: edist = EstimatedDistribution[sample, MatrixTDistribution[Array[s1, {2, 2}], Array[s2, {3, 3}], nu]]

Compute log-likelihood ratio statistic against the appropriate MatrixTDistribution

Wolfram Language code: ratio = LogLikelihood[edist, sample] - LogLikelihood[MatrixTDistribution[Σr, Σc, ν], sample]

Log-likelihood ratio follows ChiSquareDistribution with the parameter equal to the number of degrees of freedom:

Wolfram Language code: dof = (Length[Σr] + 1) * Length[Σr] / 2 + (Length[Σc] + 1) * Length[Σc] / 2 + 1

Compute the -value of log-likelihood ratio test:

Wolfram Language code: pval = SurvivalFunction[ChiSquareDistribution[dof], 2ratio]

For matrix sampled from matrix distribution, the expression follows Student distribution for any nonzero vectors and with lengths that match with the dimension of :

Wolfram Language code: v1 = RandomReal[1, 2];v2 = RandomReal[1, 3];

Use MatrixPropertyDistribution to sample values of the expression :

Wolfram Language code: Subscript[Σ, r] = {{1, 4 / 5}, {4 / 5, 1}};Subscript[Σ, c] = {{2, 1, 0}, {1, 3, 1}, {0, 1, 2}};df = 5;
Wolfram Language code: data = RandomVariate[MatrixPropertyDistribution[v1.𝓂.v2, 𝓂MatrixTDistribution[Subscript[Σ, r], Subscript[Σ, c], df]], 10 ^ 4];

Check agreement with the expected distribution:

Wolfram Language code: t𝒟 = StudentTDistribution[0, Sqrt[(v1.Subscript[Σ, r].v1)(v2.Subscript[Σ, c].v2) / df], df];
Wolfram Language code: DistributionFitTest[data, t𝒟]
Wolfram Language code: Show[Histogram[data, Automatic, PDF], Plot[PDF[t𝒟, x], {x, -4, 4}, PlotRange -> All]]

For matrix sampled from matrix distribution, follows multivariate distribution for any nonzero vector with length that matches with the number of columns of :

Wolfram Language code: v = RandomReal[1, 3];

Use MatrixPropertyDistribution to sample values of :

Wolfram Language code: Subscript[Σ, r] = {{1, 4 / 5}, {4 / 5, 1}};Subscript[Σ, c] = {{2, 1, 0}, {1, 3, 1}, {0, 1, 2}};df = 5;
Wolfram Language code: data = RandomVariate[MatrixPropertyDistribution[𝓂.v, 𝓂MatrixTDistribution[Subscript[Σ, r], Subscript[Σ, c], df]], 10 ^ 4];

Verify goodness of fit with the expected distribution:

Wolfram Language code: DistributionFitTest[data, MultivariateTDistribution[Subscript[Σ, r] (v.Subscript[Σ, c].v) / df, df]]

Possible Issues  (1)

Matrix distribution is defined up to a multiplicative scaling constant. The estimated parameters may not be close to the ones that specify the underlying distribution:

Wolfram Language code: ν = 4; sigr = ToeplitzMatrix[{9, 3, 1}]; sigc = DiagonalMatrix[{1, 2}]; dist = MatrixTDistribution[sigr, sigc, ν];

Sample from the matrix distribution:

Wolfram Language code: sample = RandomVariate[dist, 10 ^ 4];

Estimate the distribution:

Wolfram Language code: edist = EstimatedDistribution[sample, MatrixTDistribution[Array[s1, {3, 3}], Array[s2, {2, 2}], ν]];

Compare the estimated scale parameters with the ones of the underlying distribution:

Wolfram Language code: MatrixForm /@ {esigr = First[edist], sigr}
Wolfram Language code: MatrixForm /@ {esigc = edist[[2]], sigc}

Kronecker products of the scale matrices are close to each other:

Wolfram Language code: NumberForm[KroneckerProduct[sigr, sigc] - KroneckerProduct[esigr, esigc]//MatrixForm, 4]

The LogLikelihood of the distributions indicate that the estimate is good:

Wolfram Language code: LogLikelihood[#, sample]& /@ {dist, edist}

See Also

MatrixNormalDistribution  MatrixPropertyDistribution  MultivariateTDistribution  WishartMatrixDistribution  InverseWishartMatrixDistribution

Related Guides

    ▪
  • Matrix Distributions

History

Introduced in 2015 (10.3) | Updated in 2017 (11.1)

Wolfram Research (2015), MatrixTDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixTDistribution.html (updated 2017).

Text

Wolfram Research (2015), MatrixTDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/MatrixTDistribution.html (updated 2017).

CMS

Wolfram Language. 2015. "MatrixTDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/MatrixTDistribution.html.

APA

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

BibTeX

@misc{reference.wolfram_2026_matrixtdistribution, author="Wolfram Research", title="{MatrixTDistribution}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/MatrixTDistribution.html}", note=[Accessed: 01-September-2026]}

BibLaTeX

@online{reference.wolfram_2026_matrixtdistribution, organization={Wolfram Research}, title={MatrixTDistribution}, year={2017}, url={https://reference.wolfram.com/language/ref/MatrixTDistribution.html}, note=[Accessed: 01-September-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • AI Access
  • 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