The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
QR and permutation matrix
10-26-2015, 03:04 PM (This post was last modified: 10-26-2015 03:18 PM by Han.)
Post: #1
QR and permutation matrix
The QR() command returns the QR factorization of a matrix and includes a permutation matrix. I cannot seem to find an example of a matrix for which the QR factorization returns a permutation matrix that is non-identity. Is anyone able to find such a case? From the looks of it, the QR() command does not appear to do any pivoting (the diagonals of R are not in non-increasing order). For example:

M2:=[[1,2],[3,5],[-1,7],[2,-1]]
QR(M2);

returns

Code:
[
  [0.258198889747,0.169657961696,0.94436252598,−0.112822554889],
  [0.774596669241,0.393298002112,−0.326894720531,−0.372097464682],
  [−0.258198889747,0.871424985073,−3.63216356146e−2,0.415490755024],
  [0.516397779494,−0.23906349148,0,0.82230285198]
],
[
  [3.87298334621,2.06559111798],
  [0,8.64484432094],
  [0,0],
  [0,0]
],
[
  [1,0,0,0],
  [0,1,0,0],
  [0,0,1,0],
  [0,0,0,1]
]

So is there no pivoting? And if not, then it appears the P matrix is superfluous.

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
QR and permutation matrix - Han - 10-26-2015 03:04 PM
RE: QR and permutation matrix - parisse - 10-26-2015, 05:04 PM
RE: QR and permutation matrix - Han - 10-26-2015, 07:24 PM
RE: QR and permutation matrix - Han - 10-26-2015, 05:16 PM
RE: QR and permutation matrix - parisse - 10-27-2015, 06:48 AM



User(s) browsing this thread: 1 Guest(s)