Skip to content

Commit 1cc7d38

Browse files
committed
docs: add tex equations
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 0f43988 commit 1cc7d38

File tree

1 file changed

+50
-0
lines changed
  • lib/node_modules/@stdlib/lapack/base/dlarfg

1 file changed

+50
-0
lines changed

lib/node_modules/@stdlib/lapack/base/dlarfg/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,56 @@ limitations under the License.
2222

2323
> LAPACK routine to generate a real elementary reflector `H` of order `N` such that applying `H` to a vector `[alpha; X]` zeros out `X`.
2424
25+
<section class="intro">
26+
27+
The `dlarfg` routine generates a **real elementary reflector** (also known as a Householder reflector) of order `N`, which can be used to zero out selected components of a vector. Specifically, it constructs a reflector matrix `H` such that:
28+
29+
<!-- <equation class="equation" label="eq:lu_decomposition" align="center" raw="H \cdot \begin{bmatrix}\alpha \\ x \end{bmatrix} = \begin{bmatrix} \beta \\ 0 \end{bmatrix}, \quad \text{and} \quad H^T H = I" alt="Transformation of vector [α; x] into [β; 0] using orthogonal reflector H, and condition that H is orthogonal (HᵀH = I)."> -->
30+
31+
32+
```math
33+
H \cdot \begin{bmatrix}\alpha \\ x \end{bmatrix} = \begin{bmatrix} \beta \\ 0 \end{bmatrix}, \quad \text{and} \quad H^T H = I
34+
```
35+
36+
<!-- </equation> -->
37+
38+
39+
Here:
40+
41+
- `α` is a scalar.
42+
- `X` is a real vector of length `N-1`.
43+
- `β` is a scalar value.
44+
- `H` is an orthogonal matrix known as a Householder reflector.
45+
46+
The reflector `H` is constructed in the form:
47+
48+
<!-- <equation class="equation" label="eq:matrix_a" align="center" raw="H = I - \tau \begin{bmatrix}1 \\ v \end{bmatrix} \begin{bmatrix}1 & v^T \end{bmatrix}" alt="Definition of Householder reflector H as identity minus tau times the outer product of the vector [1; v] with its transpose."> -->
49+
50+
```math
51+
H = I - \tau \begin{bmatrix}1 \\ v \end{bmatrix} \begin{bmatrix}1 & v^T \end{bmatrix}
52+
```
53+
54+
<!-- </equation> -->
55+
56+
Where:
57+
58+
- `τ` (`tau`) is a real scalar.
59+
- `V` is a real vector of length `N-1` that defines the Householder vector.
60+
- The vector `[1; V]` is the Householder direction.
61+
62+
The values of `τ` and `V` are chosen so that applying `H` to the vector `[α; x]` results in a new vector `[β; 0]`, i.e., only the first component remains nonzero. The reflector matrix `H` is **symmetric and orthogonal**, satisfying `H^T = H` and `H^T H = I`.
63+
64+
### Special Cases
65+
66+
- If all elements of `x` are zero, then `τ = 0` and `H = I`, the identity matrix.
67+
- Otherwise, `τ` satisfies `1 ≤ τ ≤ 2`, ensuring numerical stability in transformations.
68+
69+
This elementary reflector is commonly used in algorithms for QR factorization and other orthogonal transformations.
70+
71+
</section>
72+
73+
<!-- /.intro -->
74+
2575
<section class="usage">
2676

2777
## Usage

0 commit comments

Comments
 (0)