对此感到困惑: 我正在计算以下矩阵X的QR分解,并且我希望通过计算乘积QR来回到X.那么,该产品几乎可以提供#34; X,但是第1列和第2列倒了......怎么会这样?
> X
[,1] [,2] [,3]
[1,] 1-0i -1+1i 1-1i
[2,] 1-1i -1+2i 1-1i
[3,] 1-1i -1+1i 1+0i
>
> QRX <- qr(X)
> X <- qr.X(QRX)
> Q <- qr.Q(QRX)
> R <- qr.R(QRX)
>
> Q%*%R
[,1] [,2] [,3]
[1,] -1+1i 1-0i 1-1i
[2,] -1+2i 1-1i 1-1i
[3,] -1+1i 1-1i 1+0i