Macaulay2 » Documentation
Packages » AdjointIdeal :: extractRightUpper
next | previous | forward | backward | up | index | toc

extractRightUpper -- Extract R from the LR decomposition result.

Synopsis

Description

Returns a right upper triangular matrix formed by the corresponding entries of A.

i1 : A=random(QQ^3,QQ^3)

o1 = | 9/2 1/2 3/2 |
     | 1/2 1   3/4 |
     | 9/4 3/4 7/4 |

              3        3
o1 : Matrix QQ  <--- QQ
i2 : (perm,LR)=LRdecomposition(A,j->-j);
i3 : LR

o3 = | 9/2 1/2   3/2   |
     | 1/9 17/18 7/12  |
     | 1/2 9/17  47/68 |

              3        3
o3 : Matrix QQ  <--- QQ
i4 : P=transpose (id_(QQ^3))_perm

o4 = | 1 0 0 |
     | 0 1 0 |
     | 0 0 1 |

              3        3
o4 : Matrix QQ  <--- QQ
i5 : R=extractRightUpper(LR)

o5 = | 9/2 1/2   3/2   |
     | 0   17/18 7/12  |
     | 0   0     47/68 |

              3        3
o5 : Matrix QQ  <--- QQ
i6 : L=extractLeftLower(LR)

o6 = | 1   0    0 |
     | 1/9 1    0 |
     | 1/2 9/17 1 |

              3        3
o6 : Matrix QQ  <--- QQ
i7 : L*R==P*A

o7 = true

See also

Ways to use extractRightUpper :

For the programmer

The object extractRightUpper is a method function.