# House hold problem

## 2141 days ago by bigdata2016

A = matrix(QQ, [[1, 2, 1, 2],[0, 1, 2, 1],[2, 0, 0, 1],[1, 0, 1, 2]]) show(A)
 \newcommand{\Bold}[1]{\mathbf{#1}}\left(\begin{array}{rrrr} 1 & 2 & 1 & 2 \\ 0 & 1 & 2 & 1 \\ 2 & 0 & 0 & 1 \\ 1 & 0 & 1 & 2 \end{array}\right)
A = matrix(QQbar, 2,2, [2,1,1,1]) A.gram_schmidt()
 ([ 2 1] [-1/5 2/5], [ 1 0] [3/5 1]) ([ 2 1] [-1/5 2/5], [ 1 0] [3/5 1])
A.gram_schmidt(orthonormal=True)
 ([ 0.8944271909999159? 0.4472135954999580?] [-0.4472135954999580? 0.8944271909999159?], [ 2.236067977499790? 0] [ 1.341640786499874? 0.4472135954999580?]) ([ 0.8944271909999159? 0.4472135954999580?] [-0.4472135954999580? 0.8944271909999159?], [ 2.236067977499790? 0] [ 1.341640786499874? 0.4472135954999580?])
A.QR()
 ([ 0.8944271909999159? -0.4472135954999580?] [ 0.4472135954999580? 0.8944271909999159?], [ 2.236067977499790? 1.341640786499874?] [ 0 0.4472135954999580?]) ([ 0.8944271909999159? -0.4472135954999580?] [ 0.4472135954999580? 0.8944271909999159?], [ 2.236067977499790? 1.341640786499874?] [ 0 0.4472135954999580?])
A.transpose()*A
 [5 3] [3 2] [5 3] [3 2]