PRODUCTS
Products Overview
Mathematica
Mathematica for Students
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
SystemModeler
Wolfram
Finance Platform
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
Merchandise
SUPPORT
Support Overview
Knowledge Base
Learning Center
Community & Forums
Training
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
New to
Mathematica
?
Find your learning path
»
Mathematica
>
Mathematics and Algorithms
>
Matrices and Linear Algebra
>
Matrix Decompositions
>
QRDecomposition
>
Mathematica
>
Mathematics and Algorithms
>
Graphs & Networks
>
Graph Programming
>
Matrices and Linear Algebra
>
Matrix Decompositions
>
QRDecomposition
>
Mathematica
>
Visualization and Graphics
>
Graphs & Networks
>
Graph Programming
>
Matrices and Linear Algebra
>
Matrix Decompositions
>
QRDecomposition
>
BUILT-IN MATHEMATICA SYMBOL
Advanced Matrix Operations
Tutorials »
|
SchurDecomposition
LUDecomposition
SingularValueDecomposition
JordanDecomposition
CholeskyDecomposition
HessenbergDecomposition
Orthogonalize
See Also »
|
Matrices and Linear Algebra
Matrix-Based Minimization
Matrix Decompositions
More About »
QRDecomposition
QRDecomposition
[
m
]
yields the QR decomposition for a numerical matrix
m
. The result is a list
, where
q
is an orthogonal matrix and
r
is an upper-triangular matrix.
MORE INFORMATION
The original matrix
m
is equal to
ConjugateTranspose
[
q
].
r
.
»
For non-square matrices,
q
is row orthonormal.
»
The matrix
r
has zeros for all entries below the leading diagonal.
»
QRDecomposition
[
m
, Pivoting->
True
]
yields a list
where
p
is a permutation matrix such that
is equal to
ConjugateTranspose
[
q
].
r
.
»
EXAMPLES
CLOSE ALL
Basic Examples
(2)
Compute the QR decomposition for a 3×2 matrix with exact values:
Compute the QR decomposition for a 2×3 matrix with approximate numerical values:
Compute the QR decomposition for a 3×2 matrix with exact values:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
Compute the QR decomposition for a 2×3 matrix with approximate numerical values:
In[1]:=
Out[1]=
In[2]:=
Out[2]=
Scope
(2)
is a 3×4 matrix:
QR decomposition computed with exact arithmetic:
QR decomposition computed with machine arithmetic:
QR decomposition computed with 24-digit arithmetic:
QR decomposition for a 3×3 matrix with random complex entries:
Options
(1)
Compute the QR decomposition using machine arithmetic with pivoting:
The elements along the diagonal of
are in order of decreasing magnitude:
The matrix
is a permutation matrix:
QRDecomposition
satisfies
m.p==
ConjugateTranspose
[q].r
:
Applications
(1)
Here is some data:
is a design matrix for fitting with basis functions
,
,
:
Find the QR decomposition of
:
This finds a vector
such that
is a minimum:
These are the coefficients for the least-squares fit:
Properties & Relations
(1)
is a 3×4 matrix:
Compute the QR decomposition:
The rows of
are orthonormal:
is upper triangular:
is equal to
ConjugateTranspose
[
q
].
r
:
SEE ALSO
SchurDecomposition
LUDecomposition
SingularValueDecomposition
JordanDecomposition
CholeskyDecomposition
HessenbergDecomposition
Orthogonalize
TUTORIALS
Advanced Matrix Operations
MORE ABOUT
Matrices and Linear Algebra
Matrix-Based Minimization
Matrix Decompositions
RELATED LINKS
Implementation notes: Numerical and Related Functions
New in 2