QR decomposition (for TI compatibility): QR

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

The QR command finds the QR decomposition of a matrix.

- QR takes three arguments:
  - A, a square matrix.
  - q and r, two variable names.
- QR(A,q,r) returns the matrix R from the QR decomposition of A, and assigns the matrices Q and R to the variables q and r.

#### Example

Input:

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

Output (the matrix R):

⎡ ⎢ ⎣ |
5 | 7
0 | 1
| ⎤ ⎥ ⎦

Input:

Q

Output (the matrix Q):

⎛ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎝ |
3
5
4
5
4
5
− |
3
5
| ⎞ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎟ ⎠