The orthogonalize command performs Gram-Schmidt reduction to make the rows of A orthogonal.
orthogonalize([[1,2],[3,4]]); [[1, 2], [4/5, -2/5]]