1DGEQRF(1) LAPACK routine (version 3.1) DGEQRF(1)
2
3
4
6 DGEQRF - a QR factorization of a real M-by-N matrix A
7
9 SUBROUTINE DGEQRF( M, N, A, LDA, TAU, WORK, LWORK, INFO )
10
11 INTEGER INFO, LDA, LWORK, M, N
12
13 DOUBLE PRECISION A( LDA, * ), TAU( * ), WORK( * )
14
16 DGEQRF computes a QR factorization of a real M-by-N matrix A: A = Q *
17 R.
18
19
21 M (input) INTEGER
22 The number of rows of the matrix A. M >= 0.
23
24 N (input) INTEGER
25 The number of columns of the matrix A. N >= 0.
26
27 A (input/output) DOUBLE PRECISION array, dimension (LDA,N)
28 On entry, the M-by-N matrix A. On exit, the elements on and
29 above the diagonal of the array contain the min(M,N)-by-N upper
30 trapezoidal matrix R (R is upper triangular if m >= n); the
31 elements below the diagonal, with the array TAU, represent the
32 orthogonal matrix Q as a product of min(m,n) elementary reflec‐
33 tors (see Further Details).
34
35 LDA (input) INTEGER
36 The leading dimension of the array A. LDA >= max(1,M).
37
38 TAU (output) DOUBLE PRECISION array, dimension (min(M,N))
39 The scalar factors of the elementary reflectors (see Further
40 Details).
41
42 WORK (workspace/output) DOUBLE PRECISION array, dimension
43 (MAX(1,LWORK))
44 On exit, if INFO = 0, WORK(1) returns the optimal LWORK.
45
46 LWORK (input) INTEGER
47 The dimension of the array WORK. LWORK >= max(1,N). For opti‐
48 mum performance LWORK >= N*NB, where NB is the optimal block‐
49 size.
50
51 If LWORK = -1, then a workspace query is assumed; the routine
52 only calculates the optimal size of the WORK array, returns
53 this value as the first entry of the WORK array, and no error
54 message related to LWORK is issued by XERBLA.
55
56 INFO (output) INTEGER
57 = 0: successful exit
58 < 0: if INFO = -i, the i-th argument had an illegal value
59
61 The matrix Q is represented as a product of elementary reflectors
62
63 Q = H(1) H(2) . . . H(k), where k = min(m,n).
64
65 Each H(i) has the form
66
67 H(i) = I - tau * v * v'
68
69 where tau is a real scalar, and v is a real vector with
70 v(1:i-1) = 0 and v(i) = 1; v(i+1:m) is stored on exit in A(i+1:m,i),
71 and tau in TAU(i).
72
73
74
75
76 LAPACK routine (version 3.1) November 2006 DGEQRF(1)