LinearAlgebra - Maple Programming Help

Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Standard : LinearAlgebra/DotProduct

LinearAlgebra

 DotProduct
 compute the dot product (standard inner product) of two Vectors
 BilinearForm
 compute the general bilinear form of two Vectors relative to a Matrix

 Calling Sequence DotProduct(U, V, c) BilinearForm(U, V, A, c)

Parameters

 U, V - Vectors A - (optional) Matrix; defines the bilinear form c - (optional) equation of the form conjugate=true or false; specifies if the Hermitian transpose is used

Description

 • The DotProduct(U, V) function computes the dot product of Vectors U and V.
 If W := DotProduct(U, V), then W is a scalar computed by using the following formula:
 $\mathrm{add}\left(F\left({U}_{i}\right)G\left({V}_{i}\right),i=1..\mathrm{Dimension}\left(U\right)\right)$
 where
 $F\left(z\right)=\stackrel{&conjugate0;}{z}$ if U is a column Vector, and $F\left(z\right)=z$ otherwise;
 $G\left(z\right)=\stackrel{&conjugate0;}{z}$ if U (not V) is a row Vector, and $G\left(z\right)=z$ otherwise; and Vectors U and V have the same dimension.
 • The BilinearForm(U, V, A) function generalizes the DotProduct(U, V) function by using Matrix A to define the form, namely the triple product of U, A, and V.
 Parameter A is optional in the calling sequence for BilinearForm.  If A is omitted, then its default value is the identity Matrix, and the bilinear form is just the dot product.
 The dimensions of U, V, and A must be such that the product can be formed. In particular, if A is not included in the calling sequence for bilinear form, U and V must have the same dimension.
 The default value of the conjugate option is true.
 • The following table defines the bilinear form for a pair of Vectors and a Matrix, determined by the orientations of the Vectors and the presence or absence of the conjugate option. In this table, an asterisk represents the Hermitian (conjugate) transpose and an apostrophe represents the transpose.
 If c is conjugate or conjugate=true:

 Orientation of 'U' Orientation of 'V' Result column column U* A V row column U A conjugate(V) row row U A* V* column row U* A* V'

 If c is conjugate=false:

 Orientation of 'U' Orientation of 'V' Result column column U' A V row column U A V row row U A' V' column row U' A' V'

 Note: The rules given in the table above are designed to ensure that if A is a positive definite Matrix (symmetric or hermitian), U = V and the conjugate option is consistent with the type of data in the Vectors and the Matrix (i.e., true if they are defined over the complexes, false if over the reals), then the result is a non-negative real scalar. In particular, if A is the identity Matrix, then the result is the square of the 2-norm of U.
 • This function is part of the LinearAlgebra package, and so it can be used in the form DotProduct(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[DotProduct](..).

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $\mathrm{V1}≔⟨x,y,1,2⟩$
 ${\mathrm{V1}}{≔}\left[\begin{array}{c}{x}\\ {y}\\ {1}\\ {2}\end{array}\right]$ (1)
 > $\mathrm{V2}≔⟨3,4,5,6⟩$
 ${\mathrm{V2}}{≔}\left[\begin{array}{c}{3}\\ {4}\\ {5}\\ {6}\end{array}\right]$ (2)
 > $\mathrm{DotProduct}\left(\mathrm{V1},\mathrm{V2}\right)$
 ${17}{+}{3}{}\stackrel{{&conjugate0;}}{{x}}{+}{4}{}\stackrel{{&conjugate0;}}{{y}}$ (3)
 > $\mathrm{BilinearForm}\left(\mathrm{V1},\mathrm{V2},\mathrm{conjugate}=\mathrm{false}\right)$
 ${17}{+}{3}{}{x}{+}{4}{}{y}$ (4)
 > $A≔⟨⟨1,5,w⟩|⟨2,6,x⟩|⟨3,7,y⟩|⟨4,8,z⟩⟩$
 ${A}{≔}\left[\begin{array}{cccc}{1}& {2}& {3}& {4}\\ {5}& {6}& {7}& {8}\\ {w}& {x}& {y}& {z}\end{array}\right]$ (5)
 > $\mathrm{V3}≔⟨4|3|2⟩$
 ${\mathrm{V3}}{≔}\left[\begin{array}{ccc}{4}& {3}& {2}\end{array}\right]$ (6)
 > $\mathrm{BilinearForm}\left(\mathrm{V1},\mathrm{V3},A\right)$
 ${113}{+}{4}{}\stackrel{{&conjugate0;}}{\left({x}{+}{2}{}{y}\right)}{+}{3}{}\stackrel{{&conjugate0;}}{\left({5}{}{x}{+}{6}{}{y}\right)}{+}{2}{}\stackrel{{&conjugate0;}}{\left({w}{}{x}{+}{x}{}{y}{+}{y}{+}{2}{}{z}\right)}$ (7)