HouseholderMatrix - Maple Help

Online Help

All Products    Maple    MapleSim

LinearAlgebra

 HouseholderMatrix
 construct a Householder Matrix

 Calling Sequence HouseholderMatrix(V, d, i, s, c, cpt, options)

Parameters

 V - Vector; used for constructing the Householder Matrix d - (optional) non-negative integer; dimension of the resulting Matrix i - (optional) positive integer; index of the top left corner of the Householder block in the resulting Matrix s - (optional) algebraic expression c - (optional) equation of the form conjugate=true or false; specifies whether to use the Hermitian transpose cpt - (optional) equation of the form compact=true or false; selects the compact form of the output options - (optional); constructor options for the result object

Description

 • The HouseholderMatrix(V) function constructs a Householder Matrix from the values in V.
 • The default value for parameter s is 2 / VectorNorm(V, 2)^2.
 • If $V$ is a Vector of dimension n and ${V}^{*}$ indicates its (Hermitian) transpose, then HouseholderMatrix(V) and HouseholderMatrix(V, n, 1, s) construct the Matrix $\mathrm{Id}-sV.{V}^{*}$ (if V is a column Vector) or $\mathrm{Id}-s{V}^{*}.V$ (if V is a row Vector), where $\mathrm{Id}=\mathrm{IdentityMatrix}\left(n\right)$, and s takes its default value if it is not provided.
 • The HouseholderMatrix(V, d, i) function is equivalent to DiagonalMatrix([IdentityMatrix(i-1), HouseholderMatrix(V), IdentityMatrix(d-i-Dimension(V))]. HouseholderMatrix(V, d, i, s) acts similarly.
 • If c is included in the calling sequence as conjugate=true, the Hermitian transpose is used.  Otherwise, the ordinary transpose is used.
 • If the compact option (cpt) is included in the calling sequence as just the symbol compact or in the form compact=true, then the result is built by using a shape function designed to minimize storage.  If the option is omitted or entered as compact=false, a full rectangular Matrix is constructed.  Generally, if space is not a consideration, the full rectangular form (the default) is more efficient.
 Note:  If the compact form is selected, any datatype specification in the constructor options is silently ignored.  The datatype of any data retrieved from the constructed Matrix is determined by the data used to build the Matrix.
 • The constructor options provide additional information (readonly, shape, storage, order, datatype, and attributes) to the Matrix constructor that builds the result. These options may also be provided in the form outputoptions=[...], where [...] represents a Maple list.  If a constructor option is provided in both the calling sequence directly and in an outputoptions option, the latter takes precedence (regardless of the order).
 • This function is part of the LinearAlgebra package, and so it can be used in the form HouseholderMatrix(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[HouseholderMatrix](..).

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $V≔⟨3,4,x⟩$
 ${V}{≔}\left[\begin{array}{c}{3}\\ {4}\\ {x}\end{array}\right]$ (1)
 > $W≔\mathrm{simplify}\left(V+\mathrm{VectorNorm}\left(V,2\right)\mathrm{UnitVector}\left(1,3\right)\right)$
 ${W}{≔}\left[\begin{array}{c}{3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\\ {4}\\ {x}\end{array}\right]$ (2)
 > $M≔\mathrm{HouseholderMatrix}\left(W\right)$
 ${M}{≔}\left[\begin{array}{ccc}{1}{-}\frac{{2}{}{\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}^{{2}}}{{16}{+}{\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}^{{2}}{+}{x}{}\stackrel{{&conjugate0;}}{{x}}}& {-}\frac{{8}{}\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}{{16}{+}{\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}^{{2}}{+}{x}{}\stackrel{{&conjugate0;}}{{x}}}& {-}\frac{{2}{}\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right){}\stackrel{{&conjugate0;}}{{x}}}{{16}{+}{\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}^{{2}}{+}{x}{}\stackrel{{&conjugate0;}}{{x}}}\\ {-}\frac{{8}{}\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}{{16}{+}{\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}^{{2}}{+}{x}{}\stackrel{{&conjugate0;}}{{x}}}& {1}{-}\frac{{32}}{{16}{+}{\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}^{{2}}{+}{x}{}\stackrel{{&conjugate0;}}{{x}}}& {-}\frac{{8}{}\stackrel{{&conjugate0;}}{{x}}}{{16}{+}{\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}^{{2}}{+}{x}{}\stackrel{{&conjugate0;}}{{x}}}\\ {-}\frac{{2}{}{x}{}\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}{{16}{+}{\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}^{{2}}{+}{x}{}\stackrel{{&conjugate0;}}{{x}}}& {-}\frac{{8}{}{x}}{{16}{+}{\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}^{{2}}{+}{x}{}\stackrel{{&conjugate0;}}{{x}}}& {1}{-}\frac{{2}{}{x}{}\stackrel{{&conjugate0;}}{{x}}}{{16}{+}{\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}^{{2}}{+}{x}{}\stackrel{{&conjugate0;}}{{x}}}\end{array}\right]$ (3)
 > $\mathrm{map}\left(\mathrm{simplify},M·V\right)$
 $\left[\begin{array}{c}{-}\frac{\left({25}{+}{\left|{x}\right|}^{{2}}\right){}\left({3}{+}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}\right)}{{\left|{x}\right|}^{{2}}{+}{3}{}\sqrt{{25}{+}{\left|{x}\right|}^{{2}}}{+}{25}}\\ {0}\\ {0}\end{array}\right]$ (4)
 > $\mathrm{HouseholderMatrix}\left(V,5,2,y,\mathrm{conjugate}=\mathrm{false}\right)$
 $\left[\begin{array}{ccccc}{1}& {0}& {0}& {0}& {0}\\ {0}& {1}{-}{9}{}{y}& {-}{12}{}{y}& {-}{3}{}{y}{}{x}& {0}\\ {0}& {-}{12}{}{y}& {1}{-}{16}{}{y}& {-}{4}{}{y}{}{x}& {0}\\ {0}& {-}{3}{}{y}{}{x}& {-}{4}{}{y}{}{x}& {-}{y}{}{{x}}^{{2}}{+}{1}& {0}\\ {0}& {0}& {0}& {0}& {1}\end{array}\right]$ (5)