âčïž Skipped - page is already crawled
| Filter | Status | Condition | Details |
|---|---|---|---|
| HTTP status | PASS | download_http_code = 200 | HTTP 200 |
| Age cutoff | PASS | download_stamp > now() - 6 MONTH | 0 months ago |
| History drop | PASS | isNull(history_drop_reason) | No drop reason |
| Spam/ban | PASS | fh_dont_index != 1 AND ml_spam_score = 0 | ml_spam_score=0 |
| Canonical | PASS | meta_canonical IS NULL OR = '' OR = src_unparsed | Not set |
| Property | Value |
|---|---|
| URL | https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html |
| Last Crawled | 2026-04-13 18:40:08 (16 hours ago) |
| First Indexed | 2014-09-22 02:08:00 (11 years ago) |
| HTTP Status Code | 200 |
| Meta Title | KarhunenLoeveDecomposition: Karhunen-Loeve transformâWolfram Documentation |
| Meta Description | KarhunenLoeveDecomposition[{a1, a2, ...}] gives the Karhunen\[Dash]Loeve transform {{b1, b2, ...}, m} of the numerical arrays {a1, a2, ...}, where m . ai == bi. KarhunenLoeveDecomposition[{b1, b2, ...}, m] uses the inverse of the matrix m for transforming bi to ai. |
| Meta Canonical | null |
| Boilerpipe Text | See Also
SingularValueDecomposition
PrincipalComponents
DimensionReduce
Related Guides
Matrix Decompositions
Image Representation
Matrices and Linear Algebra
Unsupervised Machine Learning
See Also
SingularValueDecomposition
PrincipalComponents
DimensionReduce
Related Guides
Matrix Decompositions
Image Representation
Matrices and Linear Algebra
Unsupervised Machine Learning
Examples
Â
Â
Basic Examples
Â
Â
Scope
Â
Â
Options
Â
Â
Standardized
Â
Â
Applications
Â
Â
Properties & Relations
Â
Â
KarhunenLoeveDecomposition
[
{
a
1
,
a
2
,
âŠ
}
]
Copy to clipboard.
KarhunenLoeveDecomposition[{a1,a2,âŠ}]
gives the Karhunen
â
Loeve transform
{
{
b
1
,
b
2
,
âŠ
}
,
m
}
of the numerical arrays
{
a
1
,
a
2
,
âŠ
}
, where
m
.
a
i
ï±
b
i
.
KarhunenLoeveDecomposition
[
{
b
1
,
b
2
,
âŠ
}
,
m
]
Copy to clipboard.
KarhunenLoeveDecomposition[{b1,b2,âŠ},m]
uses the inverse of the matrix
m
for transforming
b
i
to
a
i
.
Details and Options
Karhunen
â
Loeve decomposition is typically used to reduce the dimensionality of data and capture the most important variation in the first few components.
The
a
i
can be arbitrary rank arrays or images of the same dimensions.
The inner product of
m
and
{
a
1
,
a
2
,
âŠ
}
gives
{
b
1
,
b
2
,
âŠ
}
.
In
KarhunenLoeveDecomposition
[
{
a
1
,
âŠ
}
]
, rows of the transformation matrix
m
are the eigenvectors of the covariance matrix formed from the arrays
a
i
.
The matrix
m
is a linear transformation of
a
i
. The transformed arrays
b
i
are uncorrelated, are given in order of decreasing variance, and have the same total variance as
a
i
.
KarhunenLoeveDecomposition
[
{
b
1
,
b
2
,
âŠ
}
,
m
]
effectively computes the inverse Karhunen
â
Loeve transformation. If the length of
{
b
1
,
b
2
,
âŠ
}
is less than the size of
m
, missing components are assumed to be zero.
With an option setting
Standardized
ïą
True
, datasets
a
i
are shifted so that their means are zero.
Examples
open all
close all
Basic Examples
Â
Â
(2)
Summary of the most common use cases
Karhunen
â
Loeve decomposition of two datasets:
Copy to clipboard.
In[1]:=
1
https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-knb8up
Direct link to example
Out[1]=
1
Principal component decomposition of RGB color channels:
Copy to clipboard.
In[1]:=
1
https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-cistzr
Direct link to example
Out[1]=
1
Scope
Â
Â
(5)
Survey of the scope of standard use cases
Options
Â
Â
(1)
Common values & functionality for each option
Standardized
Â
Â
(1)
Karhunen
â
Loeve decomposition with datasets shifted to mean zero:
Copy to clipboard.
In[1]:=
1
https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-9aifu2
Direct link to example
Out[1]=
1
Applications
Â
Â
(3)
Sample problems that can be solved with this function
Enhance the color contrast of an RGB image:
Copy to clipboard.
In[1]:=
1
https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-c1h72f
Direct link to example
Out[1]=
1
Reconstruct a multichannel image from 1, 2, or 3 components:
Copy to clipboard.
In[1]:=
1
https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-iqpvla
Direct link to example
Out[1]=
1
Transform a list of pictorial faces:
Copy to clipboard.
In[1]:=
1
https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-exvhvo
Direct link to example
Out[1]=
1
Show the residual images when using only the first three components:
Copy to clipboard.
In[2]:=
2
https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-9lk0x
Direct link to example
Out[2]=
2
Properties & Relations
Â
Â
(7)
Properties of the function, and connections to other functions
Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).
Copy to clipboard.
Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).
Text
Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).
Copy to clipboard.
Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).
CMS
Wolfram Language. 2010. "KarhunenLoeveDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html.
Copy to clipboard.
Wolfram Language. 2010. "KarhunenLoeveDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html.
APA
Wolfram Language. (2010). KarhunenLoeveDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html
Copy to clipboard.
Wolfram Language. (2010). KarhunenLoeveDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html
BibTeX
@misc{reference.wolfram_2025_karhunenloevedecomposition, author="Wolfram Research", title="{KarhunenLoeveDecomposition}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}", note=[Accessed: 13-April-2026]}
Copy to clipboard.
@misc{reference.wolfram_2025_karhunenloevedecomposition, author="Wolfram Research", title="{KarhunenLoeveDecomposition}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}", note=[Accessed: 13-April-2026]}
BibLaTeX
@online{reference.wolfram_2025_karhunenloevedecomposition, organization={Wolfram Research}, title={KarhunenLoeveDecomposition}, year={2015}, url={https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}, note=[Accessed: 13-April-2026]}
Copy to clipboard.
@online{reference.wolfram_2025_karhunenloevedecomposition, organization={Wolfram Research}, title={KarhunenLoeveDecomposition}, year={2015}, url={https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}, note=[Accessed: 13-April-2026]} |
| Markdown | #
[Products](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [Wolfram\|One The definitive Wolfram Language and notebook experience](https://www.wolfram.com/wolfram-one/?source=nav)
- [Mathematica The original technical computing environment](https://www.wolfram.com/mathematica/?source=nav)
- [Notebook Assistant + LLM Kit All-in-one AI assistance for your Wolfram experience](https://www.wolfram.com/notebook-assistant-llm-kit/?source=nav)
- [Compute Services](https://www.wolfram.com/compute-services/?source=nav)
- [System Modeler](https://www.wolfram.com/system-modeler/?source=nav)
- [Finance Platform](https://www.wolfram.com/finance-platform/?source=nav)
- [Wolfram\|Alpha Notebook Edition](https://www.wolfram.com/wolfram-alpha-notebook-edition/?source=nav)
- [Application Server](https://www.wolfram.com/application-server/?source=nav)
- [Enterprise Private Cloud](https://www.wolfram.com/enterprise-private-cloud/?source=nav)
- [Wolfram Engine](https://www.wolfram.com/engine/?source=nav)
- [Wolfram Player](https://www.wolfram.com/player/?source=nav)
- [Wolfram Cloud App](https://www.wolfram.com/cloud-app/?source=nav)
- [Wolfram Player App](https://www.wolfram.com/player-app/?source=nav)
[More mobile apps](https://www.wolfram.com/products/?source=nav#mobile-apps)
## Core Technologies of Wolfram Products
- [Wolfram Language](https://www.wolfram.com/language/?source=nav)
- [Computable Data](https://www.wolfram.com/language/core-areas/knowledgebase/?source=nav)
- [Wolfram Notebooks](https://www.wolfram.com/notebooks/?source=nav)
- [AI & Linguistic Understanding](https://www.wolfram.com/natural-language-understanding/?source=nav)
## Deployment Options
- [Wolfram Cloud](https://www.wolfram.com/cloud/?source=nav)
- [wolframscript](https://www.wolfram.com/wolframscript/?source=nav)
- [Wolfram Engine Community Edition](https://www.wolfram.com/engine/?source=nav)
- [Wolfram LLM API](https://www.wolfram.com/resources/tools-for-AIs/?source=nav#apis-for-ais)
- [WSTPServer](https://www.wolfram.com/wstpserver/?source=nav)
- [Wolfram\|Alpha APIs](https://products.wolframalpha.com/api/?source=nav)
## From the Community
- [Function Repository](https://resources.wolframcloud.com/FunctionRepository/?source=nav)
- [Community Paclet Repository](https://resources.wolframcloud.com/PacletRepository/?source=nav)
- [Example Repository](https://resources.wolframcloud.com/ExampleRepository/?source=nav)
- [Neural Net Repository](https://resources.wolframcloud.com/NeuralNetRepository/?source=nav)
- [Prompt Repository](https://resources.wolframcloud.com/PromptRepository/?source=nav)
- [Wolfram Demonstrations](https://demonstrations.wolfram.com/?source=nav)
- [Data Repository](https://datarepository.wolframcloud.com/?source=nav)
- [Group & Organizational Licensing](https://www.wolfram.com/group-organization-licensing/?source=nav)
- [All Products](https://www.wolfram.com/products/?source=nav)
[Consulting & Solutions](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technical expertise
- Data & Computational Intelligence
- Model-Based Design
- Algorithm Development
- Wolfram\|Alpha for Business
- Blockchain Technology
- Education Technology
- Quantum Computation
[Wolfram Consulting](https://consulting.wolfram.com/?source=nav)
## Wolfram Solutions
- [Data Science](https://www.wolfram.com/data-science-consulting/?source=nav)
- [Artificial Intelligence](https://www.wolfram.com/artificial-intelligence/?source=nav)
- [Biosciences](https://www.wolfram.com/solutions/biosciences/?source=nav)
- [Healthcare Intelligence](https://www.wolfram.com/solutions/computational-intelligence-in-healthcare/?source=nav)
- [Sustainable Energy](https://www.wolfram.com/solutions/sustainable-energy/?source-nav)
- [Control Systems](https://www.wolfram.com/language/core-areas/controls/?source=nav)
- [Enterprise Wolfram\|Alpha](https://products.wolframalpha.com/enterprise/?source=nav)
- [Blockchain Labs](https://wolframblockchainlabs.com/?source=nav)
[More Wolfram Solutions](https://www.wolfram.com/solutions/?source=nav)
## Wolfram Solutions For Education
- [Research Universities](https://www.wolfram.com/education/research-universities/?source=nav)
- [Colleges & Teaching Universities](https://www.wolfram.com/education/teaching-universities/?source=nav)
- [Junior & Community Colleges](https://www.wolfram.com/education/community-colleges/?source=nav)
- [High Schools](https://www.wolfram.com/education/high-schools/?source=nav)
- [Educational Technology](https://www.wolfram.com/solutions/educational-technology/?source=nav)
- [Computer-Based Math](https://www.computerbasedmath.org/?source=nav)
[More Solutions for Education](https://www.wolfram.com/education/?source=nav)
- [Contact Us](https://consulting.wolfram.com/?source=nav#contact-us)
[Learning & Support](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
## Get Started
- [Wolfram Language Introduction](https://www.wolfram.com/language/elementary-introduction/3rd-ed/?source=nav)
- [Fast Intro for Programmers](https://www.wolfram.com/language/fast-introduction-for-programmers/?source=nav)
- [Fast Intro for Math Students](https://www.wolfram.com/language/fast-introduction-for-math-students/?source=nav)
- [Wolfram Language Documentation](https://reference.wolfram.com/language/?source=nav)
## More Learning
- [Highlighted Core Areas](https://www.wolfram.com/language/core-areas/?source=nav)
- [Demonstrations](https://demonstrations.wolfram.com/?source=nav)
- [YouTube](https://www.youtube.com/@WolframResearch/?source=nav)
- [Daily Study Groups](https://www.wolfram.com/wolfram-u/courses/wolfram-language/daily-study-groups/?source=nav)
- [Wolfram Schools and Programs](https://education.wolfram.com/programs/?source=nav)
- [Books](https://www.wolfram.com/books/?source=nav)
## Grow Your Skills
- [Wolfram U Courses in computing, science, life and more](https://www.wolfram.com/wolfram-u/?source=nav)
- [Community Learn, solve problems and share ideas.](https://community.wolfram.com/?source=nav)
- [Blog News, views and insights from Wolfram](https://blog.wolfram.com/?source=nav)
- [Resources for Software Developers](https://www.wolfram.com/developer/resources/?source=nav)
## Tech Support
- [Contact Us](https://www.wolfram.com/support/contact/?source=nav)
- [Support FAQs](https://support.wolfram.com/?source=nav)
- [Support FAQs](https://support.wolfram.com/?source=nav)
- [Contact Us](https://www.wolfram.com/support/contact/?source=nav)
[Company](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [About Wolfram](https://www.wolfram.com/company/?source=nav)
- [Career Center](https://www.wolfram.com/company/careers/?source=nav)
- [All Sites & Resources](https://www.wolfram.com/resources/?source=nav)
- [Connect & Follow](https://www.wolfram.com/connect/?source=nav)
- [Contact Us](https://www.wolfram.com/company/contact/?source=nav)
## Work with Us
- [Student Ambassador Initiative](https://www.wolfram.com/company/careers/ambassador/?source=nav)
- [Wolfram for Startups](https://www.wolfram.com/startups/?source=nav)
- [Student Opportunities](https://www.wolfram.com/company/careers/students/?source=nav)
- [Jobs Using Wolfram Language](https://community.wolfram.com/content?curTag=jobs&source=nav)
## Educational Programs for Adults
- [Summer School](https://education.wolfram.com/summer-school/?source=nav)
- [Winter School](https://education.wolfram.com/winter-school/?source=nav)
## Educational Programs for Youth
- [Middle School Camp](https://education.wolfram.com/middle-school-camp/?source=nav)
- [High School Research Program](https://education.wolfram.com/summer-research-high-school/?source=nav)
- [Computational Adventures](https://www.computationinitiative.org/computational-adventures/?source=nav)
## Read
- [Stephen Wolfram's Writings](https://writings.stephenwolfram.com/?source=nav)
- [Wolfram Blog](https://blog.wolfram.com/?source=nav)
- [Wolfram Tech \| Books](https://www.wolfram.com/books/?source=nav)
- [Wolfram Media](https://www.wolfram-media.com/?source=nav)
- [Complex Systems](https://www.complex-systems.com/?source=nav)
## Educational Resources
- [Wolfram MathWorld](https://mathworld.wolfram.com/?source=nav)
- [Wolfram in STEM/STEAM](https://www.wolfram.com/education/stem/?source=nav)
- [Wolfram Challenges](https://challenges.wolframcloud.com/?source=nav)
- [Wolfram Problem Generator](https://www.wolframalpha.com/pro/problem-generator/?source=nav)
## Wolfram Initiatives
- [Wolfram Science](https://www.wolframscience.com/?source=nav)
- [Wolfram Foundation](https://www.wolframfoundation.org/?source=nav)
- [History of Mathematics Project](https://www.history-of-mathematics.org/?source=nav)
## Events
- [Stephen Wolfram Livestreams](https://livestreams.stephenwolfram.com/?source=nav)
- [Online & In-Person Events](https://events.wolfram.com/?source=nav)
- [Contact Us](https://www.wolfram.com/company/contact/?source=nav)
- [Connect & Follow](https://www.wolfram.com/connect/?source=nav)
[Wolfram\|Alpha](https://www.wolframalpha.com/?source=nav)
- [Your Account](https://account.wolfram.com/?source=nav)
- [User Portal](https://user.wolfram.com/?source=nav)
- [Wolfram Cloud](https://www.wolframcloud.com/?source=nav)
- Products
- [Wolfram\|One](https://www.wolfram.com/wolfram-one/?source=nav)
- [Mathematica](https://www.wolfram.com/mathematica/?source=nav)
- [Notebook Assistant + LLM Kit](https://www.wolfram.com/notebook-assistant-llm-kit/?source=nav)
- [Compute Services](https://www.wolfram.com/compute-services/?source=nav)
- [System Modeler](https://www.wolfram.com/system-modeler/?source=nav)
- [Finance Platform](https://www.wolfram.com/finance-platform/?source=nav)
- [Wolfram\|Alpha Notebook Edition](https://www.wolfram.com/wolfram-alpha-notebook-edition/?source=nav)
- [Application Server](https://www.wolfram.com/application-server/?source=nav)
- [Enterprise Private Cloud](https://www.wolfram.com/enterprise-private-cloud/?source=nav)
- [Wolfram Engine](https://www.wolfram.com/engine/?source=nav)
- [Wolfram Player](https://www.wolfram.com/player/?source=nav)
- [Wolfram Cloud App](https://www.wolfram.com/cloud-app/?source=nav)
- [Wolfram Player App](https://www.wolfram.com/player-app/?source=nav)
[More mobile apps](https://www.wolfram.com/products/?source=nav#mobile-apps)
- Core Technologies
- [Wolfram Language](https://www.wolfram.com/language/?source=nav)
- [Computable Data](https://www.wolfram.com/language/core-areas/knowledgebase/?source=nav)
- [Wolfram Notebooks](https://www.wolfram.com/notebooks/?source=nav)
- [AI & Linguistic Understanding](https://www.wolfram.com/natural-language-understanding/?source=nav)
- Deployment Options
- [Wolfram Cloud](https://www.wolfram.com/cloud/?source=nav)
- [wolframscript](https://www.wolfram.com/wolframscript/?source=nav)
- [Wolfram Engine Community Edition](https://www.wolfram.com/engine/?source=nav)
- [Wolfram LLM API](https://www.wolfram.com/resources/tools-for-AIs/?source=nav#apis-for-ais)
- [WSTPServer](https://www.wolfram.com/wstpserver/?source=nav)
- [Wolfram\|Alpha APIs](https://products.wolframalpha.com/api/?source=nav)
- From the Community
- [Function Repository](https://resources.wolframcloud.com/FunctionRepository/?source=nav)
- [Community Paclet Repository](https://resources.wolframcloud.com/PacletRepository/?source=nav)
- [Example Repository](https://resources.wolframcloud.com/ExampleRepository/?source=nav)
- [Neural Net Repository](https://resources.wolframcloud.com/NeuralNetRepository/?source=nav)
- [Prompt Repository](https://resources.wolframcloud.com/PromptRepository/?source=nav)
- [Wolfram Demonstrations](https://demonstrations.wolfram.com/?source=nav)
- [Data Repository](https://datarepository.wolframcloud.com/?source=nav)
- [Group \&Organizational Licensing](https://www.wolfram.com/group-organization-licensing/?source=nav)
- [All Products](https://www.wolfram.com/products/?source=nav)
- Consulting & Solutions
We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technical expertise
[WolframConsulting.com](https://consulting.wolfram.com/?source=nav)
## Wolfram Solutions
- [Data Science](https://www.wolfram.com/data-science-consulting/?source=nav)
- [Artificial Intelligence](https://www.wolfram.com/artificial-intelligence/?source=nav)
- [Biosciences](https://www.wolfram.com/solutions/biosciences/?source=nav)
- [Healthcare Intelligence](https://www.wolfram.com/solutions/computational-intelligence-in-healthcare/?source=nav)
- [Sustainable Energy](https://www.wolfram.com/solutions/sustainable-energy/?source-nav)
- [Control Systems](https://www.wolfram.com/language/core-areas/controls/?source=nav)
- [Enterprise Wolfram\|Alpha](https://products.wolframalpha.com/enterprise/?source=nav)
- [Blockchain Labs](https://wolframblockchainlabs.com/?source=nav)
[More Wolfram Solutions](https://www.wolfram.com/solutions/?source=nav)
## Wolfram Solutions For Education
- [Research Universities](https://www.wolfram.com/education/research-universities/?source=nav)
- [Colleges & Teaching Universities](https://www.wolfram.com/education/teaching-universities/?source=nav)
- [Junior & Community Colleges](https://www.wolfram.com/education/community-colleges/?source=nav)
- [High Schools](https://www.wolfram.com/education/high-schools/?source=nav)
- [Educational Technology](https://www.wolfram.com/solutions/educational-technology/?source=nav)
- [Computer-Based Math](https://www.computerbasedmath.org/?source=nav)
[More Solutions for Education](https://www.wolfram.com/education/?source=nav)
- [Contact Us](https://consulting.wolfram.com/?source=nav#contact-us)
- Learning & Support
## Get Started
- [Wolfram Language Introduction](https://www.wolfram.com/language/elementary-introduction/3rd-ed/?source=nav)
- [Fast Intro for Programmers](https://www.wolfram.com/language/fast-introduction-for-programmers/?source=nav)
- [Fast Intro for Math Students](https://www.wolfram.com/language/fast-introduction-for-math-students/?source=nav)
- [Wolfram Language Documentation](https://reference.wolfram.com/language/?source=nav)
## Grow Your Skills
- [Wolfram U Courses in computing, science, life and more](https://www.wolfram.com/wolfram-u/?source=nav)
- [Community Learn, solve problems and share ideas.](https://community.wolfram.com/?source=nav)
- [Blog News, views and insights from Wolfram](https://blog.wolfram.com/?source=nav)
- [Resources for Software Developers](https://www.wolfram.com/developer/resources/?source=nav)
- Tech Support
- [Contact Us](https://www.wolfram.com/support/contact/?source=nav)
- [Support FAQs](https://support.wolfram.com/?source=nav)
- More Learning
- [Highlighted Core Areas](https://www.wolfram.com/language/core-areas/?source=nav)
- [Demonstrations](https://demonstrations.wolfram.com/?source=nav)
- [YouTube](https://www.youtube.com/@WolframResearch/?source=nav)
- [Daily Study Groups](https://www.wolfram.com/wolfram-u/courses/wolfram-language/daily-study-groups/?source=nav)
- [Wolfram Schools and Programs](https://education.wolfram.com/programs/?source=nav)
- [Books](https://www.wolfram.com/books/?source=nav)
- [Support FAQs](https://support.wolfram.com/?source=nav)
- [Contact Us](https://www.wolfram.com/support/contact/?source=nav)
- Company
- [About Wolfram](https://www.wolfram.com/company/?source=nav)
- [Career Center](https://www.wolfram.com/company/careers/?source=nav)
- [All Sites & Resources](https://www.wolfram.com/resources/?source=nav)
- [Connect & Follow](https://www.wolfram.com/connect/?source=nav)
- [Contact Us](https://www.wolfram.com/company/contact/?source=nav)
## Work with Us
- [Student Ambassador Initiative](https://www.wolfram.com/company/careers/ambassador/?source=nav)
- [Wolfram for Startups](https://www.wolfram.com/startups/?source=nav)
- [Student Opportunities](https://www.wolfram.com/company/careers/students/?source=nav)
- [Jobs Using Wolfram Language](https://community.wolfram.com/content?curTag=jobs&source=nav)
## Educational Programs for Adults
- [Summer School](https://education.wolfram.com/summer-school/?source=nav)
- [Winter School](https://education.wolfram.com/winter-school/?source=nav)
## Educational Programs for Youth
- [Middle School Camp](https://education.wolfram.com/middle-school-camp/?source=nav)
- [High School Research Program](https://education.wolfram.com/summer-research-high-school/?source=nav)
- [Computational Adventures](https://www.computationinitiative.org/computational-adventures/?source=nav)
## Read
- [Stephen Wolfram's Writings](https://writings.stephenwolfram.com/?source=nav)
- [Wolfram Blog](https://blog.wolfram.com/?source=nav)
- [Wolfram Tech \| Books](https://www.wolfram.com/books/?source=nav)
- [Wolfram Media](https://www.wolfram-media.com/?source=nav)
- [Complex Systems](https://www.complex-systems.com/?source=nav)
- Educational Resources
- [Wolfram MathWorld](https://mathworld.wolfram.com/?source=nav)
- [Wolfram in STEM/STEAM](https://www.wolfram.com/education/stem/?source=nav)
- [Wolfram Challenges](https://challenges.wolframcloud.com/?source=nav)
- [Wolfram Problem Generator](https://www.wolframalpha.com/pro/problem-generator/?source=nav)
- Wolfram Initiatives
- [Wolfram Science](https://www.wolframscience.com/?source=nav)
- [Wolfram Foundation](https://www.wolframfoundation.org/?source=nav)
- [History of Mathematics Project](https://www.history-of-mathematics.org/?source=nav)
- Events
- [Stephen Wolfram Livestreams](https://livestreams.stephenwolfram.com/?source=nav)
- [Online & In-Person Events](https://events.wolfram.com/?source=nav)
- [Contact Us](https://www.wolfram.com/company/contact/?source=nav)
- [Connect & Follow](https://www.wolfram.com/connect/?source=nav)
- [Wolfram\|Alpha](https://www.wolframalpha.com/?source=nav)
- [Wolfram Cloud](https://www.wolframcloud.com/?source=nav)
- [Your Account](https://account.wolfram.com/?source=nav)
- [User Portal](https://user.wolfram.com/?source=nav)
[Wolfram Language & System Documentation Center](https://reference.wolfram.com/language/)
KarhunenLoeveDecomposition
- [See Also](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [SingularValueDecomposition](https://reference.wolfram.com/language/ref/SingularValueDecomposition.html)
- [PrincipalComponents](https://reference.wolfram.com/language/ref/PrincipalComponents.html)
- [DimensionReduce](https://reference.wolfram.com/language/ref/DimensionReduce.html)
- [Related Guides](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [Matrix Decompositions](https://reference.wolfram.com/language/guide/MatrixDecompositions.html)
- [Image Representation](https://reference.wolfram.com/language/guide/ImageRepresentation.html)
- [Matrices and Linear Algebra](https://reference.wolfram.com/language/guide/MatricesAndLinearAlgebra.html)
- [Unsupervised Machine Learning](https://reference.wolfram.com/language/guide/UnsupervisedMachineLearning.html)
- - [See Also](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [SingularValueDecomposition](https://reference.wolfram.com/language/ref/SingularValueDecomposition.html)
- [PrincipalComponents](https://reference.wolfram.com/language/ref/PrincipalComponents.html)
- [DimensionReduce](https://reference.wolfram.com/language/ref/DimensionReduce.html)
- [Related Guides](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [Matrix Decompositions](https://reference.wolfram.com/language/guide/MatrixDecompositions.html)
- [Image Representation](https://reference.wolfram.com/language/guide/ImageRepresentation.html)
- [Matrices and Linear Algebra](https://reference.wolfram.com/language/guide/MatricesAndLinearAlgebra.html)
- [Unsupervised Machine Learning](https://reference.wolfram.com/language/guide/UnsupervisedMachineLearning.html)
[KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)\[{a1,a2,âŠ}\]
gives the KarhunenâLoeve transform {{b1,b2,âŠ},m} of the numerical arrays {a1,a2,âŠ}, where m.aiï±bi.
[KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)\[{b1,b2,âŠ},m\]
uses the inverse of the matrix m for transforming bi to ai.
Details and Options
 
Examples
Basic Examples
Scope
Options
Standardized
Applications
Properties & Relations
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
- [See Also](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [SingularValueDecomposition](https://reference.wolfram.com/language/ref/SingularValueDecomposition.html)
- [PrincipalComponents](https://reference.wolfram.com/language/ref/PrincipalComponents.html)
- [DimensionReduce](https://reference.wolfram.com/language/ref/DimensionReduce.html)
- [Related Guides](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [Matrix Decompositions](https://reference.wolfram.com/language/guide/MatrixDecompositions.html)
- [Image Representation](https://reference.wolfram.com/language/guide/ImageRepresentation.html)
- [Matrices and Linear Algebra](https://reference.wolfram.com/language/guide/MatricesAndLinearAlgebra.html)
- [Unsupervised Machine Learning](https://reference.wolfram.com/language/guide/UnsupervisedMachineLearning.html)
- - [See Also](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [SingularValueDecomposition](https://reference.wolfram.com/language/ref/SingularValueDecomposition.html)
- [PrincipalComponents](https://reference.wolfram.com/language/ref/PrincipalComponents.html)
- [DimensionReduce](https://reference.wolfram.com/language/ref/DimensionReduce.html)
- [Related Guides](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [Matrix Decompositions](https://reference.wolfram.com/language/guide/MatrixDecompositions.html)
- [Image Representation](https://reference.wolfram.com/language/guide/ImageRepresentation.html)
- [Matrices and Linear Algebra](https://reference.wolfram.com/language/guide/MatricesAndLinearAlgebra.html)
- [Unsupervised Machine Learning](https://reference.wolfram.com/language/guide/UnsupervisedMachineLearning.html)
# KarhunenLoeveDecompositionCopy to clipboard. â `KarhunenLoeveDecomposition`
[KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)\[{a1,a2,âŠ}\]
Copy to clipboard.
â
`KarhunenLoeveDecomposition[{a1,a2,âŠ}]`
gives the KarhunenâLoeve transform {{b1,b2,âŠ},m} of the numerical arrays {a1,a2,âŠ}, where m.aiï±bi.
[KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)\[{b1,b2,âŠ},m\]
Copy to clipboard.
â
`KarhunenLoeveDecomposition[{b1,b2,âŠ},m]`
uses the inverse of the matrix m for transforming bi to ai.
# Details and Options

- KarhunenâLoeve decomposition is typically used to reduce the dimensionality of data and capture the most important variation in the first few components.
- The ai can be arbitrary rank arrays or images of the same dimensions.
- The inner product of m and {a1,a2,âŠ} gives {b1,b2,âŠ}.
- In [KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)\[{a1,âŠ}\], rows of the transformation matrix m are the eigenvectors of the covariance matrix formed from the arrays ai.
- The matrix m is a linear transformation of ai. The transformed arrays bi are uncorrelated, are given in order of decreasing variance, and have the same total variance as ai.
- [KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)\[{b1,b2,âŠ},m\] effectively computes the inverse KarhunenâLoeve transformation. If the length of {b1,b2,âŠ} is less than the size of m, missing components are assumed to be zero.
- With an option setting [Standardized](https://reference.wolfram.com/language/ref/Standardized.html)ïą[True](https://reference.wolfram.com/language/ref/True.html), datasets ai are shifted so that their means are zero.
# Examples
open all close all
## Basic Examples (2)Summary of the most common use cases
KarhunenâLoeve decomposition of two datasets:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-knb8up`
Direct link to example
Out\[1\]=1

Principal component decomposition of RGB color channels:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-cistzr`
Direct link to example
Out\[1\]=1

## Scope (5)Survey of the scope of standard use cases
Principal components of two grayscale images:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-j1ll2v`
Direct link to example
Out\[1\]=1

KarhunenâLoeve decomposition of three matrix-valued datasets:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-pyroz`
Direct link to example
Out\[1\]=1

Copy to clipboard.
In\[2\]:=2

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-32j1v7`
Direct link to example
Out\[2\]=2

Principal components of a list of color images:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-ouqstd`
Direct link to example
Out\[1\]=1

Specify the transformation matrix:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-zsnmgd`
Direct link to example
Out\[1\]=1

Use a transformation matrix and lesser datasets:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-prlgd3`
Direct link to example
Out\[1\]=1

## Options (1)Common values & functionality for each option
### Standardized (1)
KarhunenâLoeve decomposition with datasets shifted to mean zero:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-9aifu2`
Direct link to example
Out\[1\]=1

## Applications (3)Sample problems that can be solved with this function
Enhance the color contrast of an RGB image:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-c1h72f`
Direct link to example
Out\[1\]=1

Reconstruct a multichannel image from 1, 2, or 3 components:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-iqpvla`
Direct link to example
Out\[1\]=1

Transform a list of pictorial faces:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-exvhvo`
Direct link to example
Out\[1\]=1

Show the residual images when using only the first three components:
Copy to clipboard.
In\[2\]:=2

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-9lk0x`
Direct link to example
Out\[2\]=2

## Properties & Relations (7)Properties of the function, and connections to other functions
The KarhunenâLoeve decomposition preserves the total variance:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-xfttmi`
Direct link to example
Out\[1\]=1

Copy to clipboard.
In\[2\]:=2

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-m3ehi9`
Direct link to example
Out\[2\]=2

The KarhunenâLoeve decomposition yields uncorrelated sets:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-f0wukw`
Direct link to example
Copy to clipboard.
In\[2\]:=2

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-f89dvf`
Direct link to example
Out\[2\]=2

The KarhunenâLoeve decomposition yields an orthogonal transformation matrix:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-ng385z`
Direct link to example
Copy to clipboard.
In\[2\]:=2

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-t4u4e8`
Direct link to example
Out\[2\]=2

Relation to [PrincipalComponents](https://reference.wolfram.com/language/ref/PrincipalComponents.html):
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-dnw4l2`
Direct link to example
Out\[1\]=1

Copy to clipboard.
In\[2\]:=2

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-bav5vr`
Direct link to example
Out\[2\]=2

A setting [Standardized](https://reference.wolfram.com/language/ref/Standardized.html)\-\>[True](https://reference.wolfram.com/language/ref/True.html) is equivalent to subtracting the mean from the input data:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-7ff1rn`
Direct link to example
Out\[1\]=1

Copy to clipboard.
In\[2\]:=2

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-nvp2ii`
Direct link to example
Out\[2\]=2

Normalizing by the square root of the number of datasets better preserves the input dynamics:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-gucqhn`
Direct link to example
Out\[1\]=1

[KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html) normally returns images of a real type:
Copy to clipboard.
In\[1\]:=1

â
`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-buunxk`
Direct link to example
Out\[1\]=1

# See Also
[SingularValueDecomposition](https://reference.wolfram.com/language/ref/SingularValueDecomposition.html) [PrincipalComponents](https://reference.wolfram.com/language/ref/PrincipalComponents.html) [DimensionReduce](https://reference.wolfram.com/language/ref/DimensionReduce.html)
# Related Guides
- [Matrix Decompositions](https://reference.wolfram.com/language/guide/MatrixDecompositions.html)
- [Image Representation](https://reference.wolfram.com/language/guide/ImageRepresentation.html)
- [Matrices and Linear Algebra](https://reference.wolfram.com/language/guide/MatricesAndLinearAlgebra.html)
- [Unsupervised Machine Learning](https://reference.wolfram.com/language/guide/UnsupervisedMachineLearning.html)
# History
[Introduced in 2010 (8.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn80) \| [Updated in 2014 (10.0)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn100) âȘ [2015 (10.1)](https://reference.wolfram.com/language/guide/SummaryOfNewFeaturesIn101)
Cite this as:
Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).
Copy to clipboard.
â
`Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).`

#### Text
Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).
Copy to clipboard.
â
`Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).`
#### CMS
Wolfram Language. 2010. "KarhunenLoeveDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html.
Copy to clipboard.
â
`Wolfram Language. 2010. "KarhunenLoeveDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html.`
#### APA
Wolfram Language. (2010). KarhunenLoeveDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html
Copy to clipboard.
â
`Wolfram Language. (2010). KarhunenLoeveDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html`
#### BibTeX
@misc{reference.wolfram\_2025\_karhunenloevedecomposition, author="Wolfram Research", title="{KarhunenLoeveDecomposition}", year="2015", howpublished="\\url{https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}", note=\[Accessed: 13-April-2026\]}
Copy to clipboard.
â
`@misc{reference.wolfram_2025_karhunenloevedecomposition, author="Wolfram Research", title="{KarhunenLoeveDecomposition}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}", note=[Accessed: 13-April-2026]}`
#### BibLaTeX
@online{reference.wolfram\_2025\_karhunenloevedecomposition, organization={Wolfram Research}, title={KarhunenLoeveDecomposition}, year={2015}, url={https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}, note=\[Accessed: 13-April-2026\]}
Copy to clipboard.
â
`@online{reference.wolfram_2025_karhunenloevedecomposition, organization={Wolfram Research}, title={KarhunenLoeveDecomposition}, year={2015}, url={https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}, note=[Accessed: 13-April-2026]}`
Give Feedback
[Top](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html#top)
[Introduction for Programmers](https://www.wolfram.com/language/fast-introduction-for-programmers/en/)
[Introductory Book](https://www.wolfram.com/language/elementary-introduction/)
[Wolfram Function Repository](http://resources.wolframcloud.com/FunctionRepository/) \| [Wolfram Data Repository](https://datarepository.wolframcloud.com/) \| [Wolfram Data Drop](https://datadrop.wolframcloud.com/) \| [Wolfram Language Products](https://www.wolfram.com/products/)
[Top](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html#top)
- Products
- [Wolfram\|One](https://www.wolfram.com/wolfram-one/?source=footer)
- [Mathematica](https://www.wolfram.com/mathematica/?source=footer)
- [Notebook Assistant + LLM Kit](https://www.wolfram.com/notebook-assistant-llm-kit/?source=footer)
- [Compute Services](https://www.wolfram.com/compute-services/?source=footer)
- [System Modeler](https://www.wolfram.com/system-modeler/?source=footer)
- ***
- [Wolfram\|Alpha Notebook Edition](https://www.wolfram.com/wolfram-alpha-notebook-edition/?source=footer)
- [Wolfram\|Alpha Pro](https://www.wolframalpha.com/pro/?source=footer)
- [Mobile Apps](https://www.wolfram.com/products/?source=footer#mobile-apps)
- ***
- [Wolfram Engine](https://www.wolfram.com/engine/?source=footer)
- [Wolfram Player](https://www.wolfram.com/player/?source=footer)
- ***
- [Volume & Site Licensing](https://www.wolfram.com/group-organization-licensing/?source=footer)
- [Server Deployment Options](https://www.wolfram.com/server-deployment-options/?source=footer)
- Consulting
- [Wolfram Consulting](https://consulting.wolfram.com/?source=footer)
- Repositories
- [Data Repository](https://datarepository.wolframcloud.com/?source=footer)
- [Function Repository](https://resources.wolframcloud.com/FunctionRepository/?source=footer)
- [Community Paclet Repository](https://resources.wolframcloud.com/PacletRepository/?source=footer)
- [Neural Net Repository](https://resources.wolframcloud.com/NeuralNetRepository/?source=footer)
- [Prompt Repository](https://resources.wolframcloud.com/PromptRepository/?source=footer)
- ***
- [Wolfram Language Example Repository](https://resources.wolframcloud.com/ExampleRepository/?source=footer)
- [Notebook Archive](https://notebookarchive.org/?source=footer)
- [Wolfram GitHub](https://github.com/wolframresearch/?source=footer)
- Learning
- [Wolfram U](https://www.wolfram.com/wolfram-u/?source=footer)
- [Wolfram Language Documentation](https://reference.wolfram.com/language/?source=footer)
- [Webinars & Training](https://events.wolfram.com/?source=footer)
- [Educational Programs](https://education.wolfram.com/programs/?source=footer)
- ***
- [Wolfram Language Introduction](https://www.wolfram.com/language/elementary-introduction/3rd-ed/?source=footer)
- [Fast Introduction for Programmers](https://www.wolfram.com/language/fast-introduction-for-programmers/?source=footer)
- [Fast Introduction for Math Students](https://www.wolfram.com/language/fast-introduction-for-math-students/?source=footer)
- [Books](https://www.wolfram.com/books/?source=footer)
- ***
- [Wolfram Community](https://community.wolfram.com/?source=footer)
- [Wolfram Blog](https://blog.wolfram.com/?source=footer)
- Public Resources
- [Wolfram\|Alpha](https://www.wolframalpha.com/?source=footer)
- [Wolfram Problem Generator](https://www.wolframalpha.com/pro/problem-generator/?source=footer)
- [Wolfram Challenges](https://challenges.wolframcloud.com/?source=footer)
- ***
- [Computer-Based Math](https://www.computerbasedmath.org/?source=footer)
- [Computational Thinking](https://www.wolfram.com/resources/computational-thinking/?source=footer)
- [Computational Adventures](https://www.computationinitiative.org/computational-adventures/?source=footer)
- ***
- [Demonstrations Project](https://demonstrations.wolfram.com/?source=footer)
- [Wolfram Data Drop](https://datadrop.wolframcloud.com/?source=footer)
- [MathWorld](https://mathworld.wolfram.com/?source=footer)
- [Wolfram Science](https://www.wolframscience.com/?source=footer)
- [Wolfram Media Publishing](https://www.wolfram-media.com/?source=footer)
- Customer Resources
- [Store](https://www.wolfram.com/get-products-services/?source=footer)
- [Product Downloads](https://www.wolfram.com/download-center/?source=footer)
- [User Portal](https://user.wolfram.com/portal/?source=footer)
- [Your Account](https://account.wolfram.com/?source=footer)
- [Organization Access](https://www.wolfram.com/siteinfo/?source=footer)
- ***
- [Support FAQ](https://support.wolfram.com/?source=footer)
- [Contact Support](https://www.wolfram.com/support/contact/?source=footer)
- Company
- [About Wolfram](https://www.wolfram.com/company/?source=footer)
- [Careers](https://www.wolfram.com/company/careers/?source=footer)
- [Contact](https://www.wolfram.com/company/contact/?source=footer)
- [Events](https://company.wolfram.com/events/?source=footer)
[Wolfram Community](https://community.wolfram.com/?source=footer) [Wolfram Blog](https://blog.wolfram.com/?source=footer)
[Legal](https://www.wolfram.com/legal/?source=footer) & [Privacy Policy](https://www.wolfram.com/legal/privacy/wolfram/?source=footer)
[WolframAlpha.com](https://www.wolframalpha.com/?source=footer) \| [WolframCloud.com](https://www.wolframcloud.com/?source=footer)
© 2026 [Wolfram](https://www.wolfram.com/?source=footer)
© 2026 [Wolfram](https://www.wolfram.com/?source=footer) \| [Legal](https://www.wolfram.com/legal/?source=footer) & [Privacy Policy](https://www.wolfram.com/legal/privacy/wolfram/?source=footer) \|
English
- [English](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html.en?source=footer)
- [æ„æŹèȘ](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html.ja?source=footer)
- [çźäœäžæ](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html.zh?source=footer)
[Find out if you already have access to Wolfram tech through your organization](https://www.wolfram.com/siteinfo/)
Ă |
| Readable Markdown | - [See Also](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [SingularValueDecomposition](https://reference.wolfram.com/language/ref/SingularValueDecomposition.html)
- [PrincipalComponents](https://reference.wolfram.com/language/ref/PrincipalComponents.html)
- [DimensionReduce](https://reference.wolfram.com/language/ref/DimensionReduce.html)
- [Related Guides](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [Matrix Decompositions](https://reference.wolfram.com/language/guide/MatrixDecompositions.html)
- [Image Representation](https://reference.wolfram.com/language/guide/ImageRepresentation.html)
- [Matrices and Linear Algebra](https://reference.wolfram.com/language/guide/MatricesAndLinearAlgebra.html)
- [Unsupervised Machine Learning](https://reference.wolfram.com/language/guide/UnsupervisedMachineLearning.html)
- - [See Also](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [SingularValueDecomposition](https://reference.wolfram.com/language/ref/SingularValueDecomposition.html)
- [PrincipalComponents](https://reference.wolfram.com/language/ref/PrincipalComponents.html)
- [DimensionReduce](https://reference.wolfram.com/language/ref/DimensionReduce.html)
- [Related Guides](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)
- [Matrix Decompositions](https://reference.wolfram.com/language/guide/MatrixDecompositions.html)
- [Image Representation](https://reference.wolfram.com/language/guide/ImageRepresentation.html)
- [Matrices and Linear Algebra](https://reference.wolfram.com/language/guide/MatricesAndLinearAlgebra.html)
- [Unsupervised Machine Learning](https://reference.wolfram.com/language/guide/UnsupervisedMachineLearning.html)
Examples
Basic Examples
Scope
Options
Standardized
Applications
Properties & Relations
[KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)\[{a1,a2,âŠ}\]
Copy to clipboard.
`KarhunenLoeveDecomposition[{a1,a2,âŠ}]`
gives the KarhunenâLoeve transform {{b1,b2,âŠ},m} of the numerical arrays {a1,a2,âŠ}, where m.aiï±bi.
[KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)\[{b1,b2,âŠ},m\]
Copy to clipboard.
`KarhunenLoeveDecomposition[{b1,b2,âŠ},m]`
uses the inverse of the matrix m for transforming bi to ai.
## Details and Options

- KarhunenâLoeve decomposition is typically used to reduce the dimensionality of data and capture the most important variation in the first few components.
- The ai can be arbitrary rank arrays or images of the same dimensions.
- The inner product of m and {a1,a2,âŠ} gives {b1,b2,âŠ}.
- In [KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)\[{a1,âŠ}\], rows of the transformation matrix m are the eigenvectors of the covariance matrix formed from the arrays ai.
- The matrix m is a linear transformation of ai. The transformed arrays bi are uncorrelated, are given in order of decreasing variance, and have the same total variance as ai.
- [KarhunenLoeveDecomposition](https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html)\[{b1,b2,âŠ},m\] effectively computes the inverse KarhunenâLoeve transformation. If the length of {b1,b2,âŠ} is less than the size of m, missing components are assumed to be zero.
- With an option setting [Standardized](https://reference.wolfram.com/language/ref/Standardized.html)ïą[True](https://reference.wolfram.com/language/ref/True.html), datasets ai are shifted so that their means are zero.
## Examples
open all close all
## Basic Examples (2)Summary of the most common use cases
KarhunenâLoeve decomposition of two datasets:
Copy to clipboard.
In\[1\]:=1

`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-knb8up`
Direct link to example
Out\[1\]=1

Principal component decomposition of RGB color channels:
Copy to clipboard.
In\[1\]:=1

`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-cistzr`
Direct link to example
Out\[1\]=1

## Scope (5)Survey of the scope of standard use cases
## Options (1)Common values & functionality for each option
### Standardized (1)
KarhunenâLoeve decomposition with datasets shifted to mean zero:
Copy to clipboard.
In\[1\]:=1

`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-9aifu2`
Direct link to example
Out\[1\]=1

## Applications (3)Sample problems that can be solved with this function
Enhance the color contrast of an RGB image:
Copy to clipboard.
In\[1\]:=1

`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-c1h72f`
Direct link to example
Out\[1\]=1

Reconstruct a multichannel image from 1, 2, or 3 components:
Copy to clipboard.
In\[1\]:=1

`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-iqpvla`
Direct link to example
Out\[1\]=1

Transform a list of pictorial faces:
Copy to clipboard.
In\[1\]:=1

`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-exvhvo`
Direct link to example
Out\[1\]=1

Show the residual images when using only the first three components:
Copy to clipboard.
In\[2\]:=2

`https://wolfram.com/xid/0b6jc6p63p4r5i51zoyjrm-9lk0x`
Direct link to example
Out\[2\]=2

## Properties & Relations (7)Properties of the function, and connections to other functions
Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).
Copy to clipboard.
`Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).`
#### Text
Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).
Copy to clipboard.
`Wolfram Research (2010), KarhunenLoeveDecomposition, Wolfram Language function, https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html (updated 2015).`
#### CMS
Wolfram Language. 2010. "KarhunenLoeveDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html.
Copy to clipboard.
`Wolfram Language. 2010. "KarhunenLoeveDecomposition." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html.`
#### APA
Wolfram Language. (2010). KarhunenLoeveDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html
Copy to clipboard.
`Wolfram Language. (2010). KarhunenLoeveDecomposition. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html`
#### BibTeX
@misc{reference.wolfram\_2025\_karhunenloevedecomposition, author="Wolfram Research", title="{KarhunenLoeveDecomposition}", year="2015", howpublished="\\url{https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}", note=\[Accessed: 13-April-2026\]}
Copy to clipboard.
`@misc{reference.wolfram_2025_karhunenloevedecomposition, author="Wolfram Research", title="{KarhunenLoeveDecomposition}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}", note=[Accessed: 13-April-2026]}`
#### BibLaTeX
@online{reference.wolfram\_2025\_karhunenloevedecomposition, organization={Wolfram Research}, title={KarhunenLoeveDecomposition}, year={2015}, url={https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}, note=\[Accessed: 13-April-2026\]}
Copy to clipboard.
`@online{reference.wolfram_2025_karhunenloevedecomposition, organization={Wolfram Research}, title={KarhunenLoeveDecomposition}, year={2015}, url={https://reference.wolfram.com/language/ref/KarhunenLoeveDecomposition.html}, note=[Accessed: 13-April-2026]}` |
| Shard | 184 (laksa) |
| Root Hash | 3744487911316863784 |
| Unparsed URL | com,wolfram!reference,/language/ref/KarhunenLoeveDecomposition.html s443 |