### 5.50.3 QR decomposition (for TI compatibility) : QR

QR takes as argument a numeric square matrix A of size n and two variable names, var1 and var2.
QR factorizes this matrix numerically as Q*R where Q is an orthogonal matrix (tQ*Q=I) and R is an upper triangular matrix. QR(A,var1,var2) returns R, stores Q=A*inv(R) in var1 and R in var2.
Input :

QR([[3,5],[4,5]],Q,R)

Output the matrix R :

[[-5,-7],[0,-1]]

Then input :

Q

Output the matrix Q :

[[-0.6,-0.8],[-0.8,0.6]]