RQ performs RQ-decomposition of A. Input: A - input matrix Output: r - upper triangular matrix q - orthogonal matrix such that A = r q