[−][src]Trait maths_traits::algebra::module_like::SesquilinearForm
A product between two vectors or module elements resulting in a scalar that is semi-linear in both arguments
Rigorously, a σ-sesquilinear form is a mapping •:M⨯M->R
from a Ring Module to its base ring such that:
(x+y)•z = x•z + y•z
x•(y+z) = x•y + x•y
(c*x)•y = c*(x•y)
x•(c*y) = (x•y)*σ(c)
whereσ:R->R
is some anti-automorphism, usually the complex conjugate or the identity map
Notes on Definition
It is additionally worth emphasizing that in general, while there are a number of other properties commonly added to this list, none of them should be assumed without the addition of the appropriate marker trait. In particular:
x•(c*y)
may not equal(x•y)*c
x•y
may not equaly•x
x•y = 0
does not necessarily implyy•x = 0
However, if these properties are desired, then the following additional traits can be implemented or used:
- ReflexiveForm:
x•y = 0
impliesy•x = 0
- as a consequence, Orthogonality becomes a reflexive property
- SymSesquilinearForm:
σ(x•y) = y•x
- SkewSesquilinearForm:
σ(x•y) = -y•x
- BilinearForm:
x•(c*y) = (x•y)*c
, ie,σ(x) = x
for allx
- If also a SymSesquilinearForm, this implies
x•y = y•x
- If also a SkewSesquilinearForm, this implies
x•y = -y•x
- If also a SymSesquilinearForm, this implies
- ComplexSesquilinearForm:
x•(c*y) = (x•y)*̅c
, ieR ⊆ ℂ
andσ(x) = ̅x
for allx
- If also a SymSesquilinearForm, this implies
x•y = ̅y̅•̅x
- If also a SkewSesquilinearForm, this implies
x•y = -̅y̅•̅x
- If also a SymSesquilinearForm, this implies
Examples
- Dot product of finite dimensional spaces and modules:
x•y = Σ(xₖ*yₖ)
- Inner Product of real and complex vector spaces of any dimension
- Complex and Hyper-complex moduli:
z*̅w
- The "Cross-Product" in 2D real-vector spaces:
x₁*y₂ - x₂*y₁
- Alternatively, the mapping taking two vectors to the determinant of the matrix with the vectors as its columns
- Minkowski metric:
ds² = dx² + dy² + dz² - dt²
- Scalar product of the conformal model of Geometric algebra
Required methods
fn product_of(&self, v1: M, v2: M) -> R
The function that applies the sesquilinear form
Specifically, a mapping •:M⨯M->R
such that
(x + y)•z = x•z + y•z
x•(y + z) = x•y + x•y
(c*x)•y = c*(x•y)
x•(c*y) = (x•y)*σ(c)
whereσ
is some anti-automorphism ofR
Provided methods
fn sigma(&self, x: R) -> R
The mapping on R
that factors the second argument of the sesquilinear form
Specifically: a function σ:R->R
such that:
x•(c*y) = (x•y)*σ(c)
σ
is an anti-automorphism:σ(a + b) = σ(a) + σ(b)
σ(a*b) = σ(b)*σ(a)
σ(a)!=σ(b)
whenevera!=b
- for all
a
inR
, there is ab
inR
whereσ(b) = a
By default, this is just the identity operation, but common alternatives include negation and the complex conjugate
fn sigma_inv(&self, x: R) -> R
The inverse of the σ
fn square(&self, x: M) -> R
An alias for x•x
fn is_null(&self, x: M) -> bool
Returns true if x•x = 0
fn orthogonal(&self, x: M, y: M) -> bool
Returns true if x•y = 0
Note that this may not imply that y
is orthogonal to x
, unless the product is also a
ReflexiveForm
fn orth_comp(&self, x: M, y: M) -> M where
R: DivisionRing,
R: DivisionRing,
The orthogonal component of y
with respect to x
, assuming x is not null
Specifically, this a vector or element v
such that:
v•x = 0
y-v = c*x
for somec
inR
Most of the time, this can be computed simply by subtracting the parallel component
from y
Do note however, that if x
is a null-element (ie. x•x = 0
),
then such a vector does not exist and this function may panic!
fn par_comp(&self, x: M, y: M) -> M where
R: DivisionRing,
R: DivisionRing,
The parallel component of y
with respect to x
, assuming x is not null
Specifically, this a vector or element w
such that:
w = c*x
for somec
inR
(y-w)•x = 0
This can usually be computed simply with the formula w = x*(y•x)*((x•x)⁻¹)
Do note however, that if x
is a null-element (ie. x•x = 0
),
then such a vector does not exist and this function may panic!