next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
AdjointIdeal :: extractRightUpper

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 = | 1/4 1   2   |
     | 2/3 2/7 9/8 |
     | 3/5 3   5/2 |

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

o3 = | 2/3  2/7     9/8       |
     | 9/10 96/35   119/80    |
     | 3/8  125/384 6721/6144 |

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

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

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

o5 = | 2/3 2/7   9/8       |
     | 0   96/35 119/80    |
     | 0   0     6721/6144 |

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

o6 = | 1    0       0 |
     | 9/10 1       0 |
     | 3/8  125/384 1 |

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

o7 = true

See also

Ways to use extractRightUpper :