Difference between revisions of "ApCoCoA-1:Num.QR"

From ApCoCoAWiki
(removing unneeded keys)
Line 3: Line 3:
 
     <short_description>QR-decomposition of a matrix</short_description>
 
     <short_description>QR-decomposition of a matrix</short_description>
 
<syntax>
 
<syntax>
$numerical.QR(A:Matrix):Matrix;
+
$numerical.QR(A:Matrix):[Matrix,Matrix];
 
</syntax>
 
</syntax>
 
     <description>
 
     <description>
This function returns a matrix, containing the <em>IMPI</em>.  The matrix consists
+
This function returns an orthogonal matrix Q and an upper-right triangular matrix matrix R such that Q*R=A.
of the upper-right triangular matrix and the lower left triangular matrix,
 
describing the input matrix's QR-decomposition.
 
  
 
<example>
 
<example>
Line 14: Line 12:
 
$numerical.QR(Points);
 
$numerical.QR(Points);
 
-------------------------------
 
-------------------------------
Mat([
+
[Mat([
   [-8425463406411593/2251799813685248, 7598355191047809/18014398509481984, 5698766393285857/9007199254740992],
+
   [-601818814743685/2251799813685248, 11221204152260750623490098342212473544619072342960407833413029/12855504354071922204335696738729300820177623950262342682411008, 47271922480373450167411707109523238704832584221077416524231372166340777774771/115792089237316195423570985008687907853269984665640564039457584007913129639936],
   [-1504547036859213/281474976710656, 737074506864293/1125899906842624, 7744099468837749/9007199254740992],
+
  [-21682807918593711888147761857797/40564819207303340847894502572032, 50535810838769898760508425874290037828518802391596092889928280803858452207141/231584178474632390847141970017375815706539969331281128078915168015826259279872, -1703150499741573022389535271505216648161852967701209661846360168011288983405834487511405397453/2085924839766513752338888384931203236916703635113918720651407820138886450957656787131798913024],
   [-7823644591667907/1125899906842624, 5896596054914343/4503599627370496, -809/4611686018427387904]
+
   [-16262105938945284629515478500581/20282409603651670423947251286016, -50535810838769832038494686341702987883818294138398199855497298160515307568635/115792089237316195423570985008687907853269984665640564039457584007913129639936, 425787624935393028634420116827871332361842515189763323298971758853897488257161264158457298771/1042962419883256876169444192465601618458351817556959360325703910069443225478828393565899456512]
])
+
]), Mat([
 +
   [-8425463406411593/2251799813685248, -1504547036859213/281474976710656, -7823644591667907/1125899906842624],
 +
  [0, 5896596054914343/9007199254740992, 5896596054914343/4503599627370496],
 +
  [0, 0, 1197/9223372036854775808]
 +
])]
 
-------------------------------
 
-------------------------------
 
</example>
 
</example>

Revision as of 21:55, 21 June 2008

Numerical.QR

QR-decomposition of a matrix

Syntax

$numerical.QR(A:Matrix):[Matrix,Matrix];

Description

This function returns an orthogonal matrix Q and an upper-right triangular matrix matrix R such that Q*R=A.

Example

Points:=Mat([[1,2,3],[2,3,4],[3,4,5]]);
$numerical.QR(Points);
-------------------------------
[Mat([
  [-601818814743685/2251799813685248, 11221204152260750623490098342212473544619072342960407833413029/12855504354071922204335696738729300820177623950262342682411008, 47271922480373450167411707109523238704832584221077416524231372166340777774771/115792089237316195423570985008687907853269984665640564039457584007913129639936],
  [-21682807918593711888147761857797/40564819207303340847894502572032, 50535810838769898760508425874290037828518802391596092889928280803858452207141/231584178474632390847141970017375815706539969331281128078915168015826259279872, -1703150499741573022389535271505216648161852967701209661846360168011288983405834487511405397453/2085924839766513752338888384931203236916703635113918720651407820138886450957656787131798913024],
  [-16262105938945284629515478500581/20282409603651670423947251286016, -50535810838769832038494686341702987883818294138398199855497298160515307568635/115792089237316195423570985008687907853269984665640564039457584007913129639936, 425787624935393028634420116827871332361842515189763323298971758853897488257161264158457298771/1042962419883256876169444192465601618458351817556959360325703910069443225478828393565899456512]
]), Mat([
  [-8425463406411593/2251799813685248, -1504547036859213/281474976710656, -7823644591667907/1125899906842624],
  [0, 5896596054914343/9007199254740992, 5896596054914343/4503599627370496],
  [0, 0, 1197/9223372036854775808]
])]
-------------------------------

See also

Introduction to CoCoAServer

Numerical.SVD

Numerical.EigenValues

Numerical.EigenValuesAndVectors

Numerical.EigenValuesAndAllVectors