Define the Maple matrix
The QR decomposition of this MapleMatrix is computed and returns Q and R, as follows:
Q, R :=
|
[-0.404519917477945468 , 0.418121005003545431 , -0.120768607347027060 , -0.804334137667873206]
|
[-0.134839972492648424 , -0.903141370807658106 , 0.0315048540905287777 , -0.406400406400609482]
|
[-0.809039834955890602 , -0.0836242010007090253 , -0.399061485146697980 , 0.423333756667301608]
|
[-0.404519917477945301 , 0.0501745206004254873 , 0.908389959610246600 , 0.0931334264668064182]
|
[-7.41619848709566209 -8.09039834955890668 -11.0568777443971715]
|
[ ]
|
[ 0. -5.43557306504609006 -2.67597443202269013]
|
[ ]
|
[ 0. 0. 2.92995143041917760 ]
|
[ ]
|
[ 0. 0. 0. ]
|
|
|
The QR decomposition returning only the R matrix is as follows:
[-7.41619848709566209 , -8.09039834955890668 , -11.0568777443971715]
|
[ ]
|
[0.0960043149368622339 , -5.43557306504609006 , -2.67597443202269013]
|
[ ]
|
[0.576025889621173404 , 0.166971439413840017 , 2.92995143041917760]
|
[ ]
|
[0.288012944810586701 , 0.0361500352119390120 , -0.704436674263540508]
|
|
|
To force the lower triangle entries to zero, use
[-7.41619848709566209 -8.09039834955890668 -11.0568777443971715]
|
[ ]
|
[ 0. -5.43557306504609006 -2.67597443202269013]
|
[ ]
|
[ 0. 0. 2.92995143041917760 ]
|
[ ]
|
[ 0. 0. 0. ]
|
|
|
Note that the R in is surrounded by quotation marks, since the variable R was assigned previously. QR decomposition returning Q, R, and P matrices is as follows: