Wilang Documentation1.0.0+4

qr#

Calculates the Matrix QR decomposition. Matrix A is decomposed in two matrices (Q, R) where Q is an orthogonal matrix and R is an upper triangular matrix.

Available in: math cells, REPL.

Syntax#

qr(A)

Arguments and behavior#

Arguments must match one of the syntax forms above. Use the example as a starting point; arrays and numeric types are accepted only by compatible overloads. The example returns scalar (unknown).

Example#

Edit the inputs, then use Run or Reset. Changes stay in this example.

Example
qr([[1, -1,  4], [1,  4, -2], [1,  4,  2], [1,  -1, 0]])

Expected result: Q: [[0.5, -0.5, 0.49999999999999994, 0.5], [0.5, 0.5000000000000001, -0.5000000000000002, 0.5000000000000001], [0.5, 0.5, 0.5000000000000001, -0.5000000000000001], [0.5, -0.4999999999999999, -0.5000000000000001, -0.5]] R: [[1.9999999999999996, 3, 2], [0, 5, -2], [0, 0, 4], [0, 0, 0]].

See also#

lup · slu · matrix

All functions · Math guides