LinearAlgebra - Maple Programming Help

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Constructors : LinearAlgebra/OuterProductMatrix

LinearAlgebra

 OuterProductMatrix
 construct the outer product of two Vectors

 Calling Sequence OuterProductMatrix(U, V, cpt, options)

Parameters

 U - first Vector in the outer product V - second Vector in the outer product cpt - (optional) BooleanOpt(compact); selects the compact form of the output options - (optional); constructor options for the result object

Description

 • The OuterProductMatrix(U, V) function constructs the outer product of Vectors U and V.
 • If P := OuterProductMatrix(U, V), then  P is an m x n Matrix where m is the dimension of U and n is the dimension of V, and  P[i, j] = U[i]*V[j].
 • 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 OuterProductMatrix(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[OuterProductMatrix](..).

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $\mathrm{V1}≔⟨1,2,3,4⟩$
 ${\mathrm{V1}}{≔}\left[\begin{array}{r}{1}\\ {2}\\ {3}\\ {4}\end{array}\right]$ (1)
 > $\mathrm{V2}≔⟨a,b,c⟩$
 ${\mathrm{V2}}{≔}\left[\begin{array}{c}{a}\\ {b}\\ {c}\end{array}\right]$ (2)
 > $\mathrm{OuterProductMatrix}\left(\mathrm{V1},\mathrm{V2}\right)$
 $\left[\begin{array}{ccc}{a}& {b}& {c}\\ {2}{}{a}& {2}{}{b}& {2}{}{c}\\ {3}{}{a}& {3}{}{b}& {3}{}{c}\\ {4}{}{a}& {4}{}{b}& {4}{}{c}\end{array}\right]$ (3)

 See Also

Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam