compute the dot product (standard inner product) of two Vectors
compute the general bilinear form of two Vectors relative to a Matrix
DotProduct(U, V, c)
BilinearForm(U, V, A, c)
(optional) Matrix; defines the bilinear form
(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:
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'
U* A V
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](..).
V1 ≔ x,y,1,2
V2 ≔ 3,4,5,6
A ≔ 1,5,w|2,6,x|3,7,y|4,8,z
V3 ≔ 4|3|2
Download Help Document
What kind of issue would you like to report? (Optional)