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
Parameters
Description
Examples
DotProduct(U, V, c)
BilinearForm(U, V, A, c)
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
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:
add⁡F⁡Ui⁢G⁡Vi,i=1..Dimension⁡U
where
F⁡z=z&conjugate0; if U is a column Vector, and F⁡z=z otherwise;
G⁡z=z&conjugate0; if U (not V) is a row Vector, and G⁡z=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
U* A V
row
U A conjugate(V)
U A* V*
U* A* V'
If c is conjugate=false:
U' A V
U A V
U A' V'
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](..).
with⁡LinearAlgebra:
V1≔x,y,1,2
V1≔xy12
V2≔3,4,5,6
V2≔3456
DotProduct⁡V1,V2
17+3⁢x&conjugate0;+4⁢y&conjugate0;
BilinearForm⁡V1,V2,conjugate=false
17+3⁢x+4⁢y
A≔1,5,w|2,6,x|3,7,y|4,8,z
A≔12345678wxyz
V3≔4|3|2
V3≔432
BilinearForm⁡V1,V3,A
113+4⁢x+2⁢y&conjugate0;+3⁢5⁢x+6⁢y&conjugate0;+2⁢w⁢x+x⁢y+y+2⁢z&conjugate0;
See Also
LinearAlgebra[CrossProduct]
LinearAlgebra[Dimension]
LinearAlgebra[HermitianTranspose]
LinearAlgebra[Norm]
LinearAlgebra[Transpose]
Matrix
Vector
VectorCalculus[DotProduct]
Download Help Document