Vectors and Matrices Basilio Bona DAUIN Politecnico di Torino - - PowerPoint PPT Presentation

vectors and matrices
SMART_READER_LITE
LIVE PREVIEW

Vectors and Matrices Basilio Bona DAUIN Politecnico di Torino - - PowerPoint PPT Presentation

Vectors and Matrices Basilio Bona DAUIN Politecnico di Torino October 2013 B. Bona (DAUIN) Vectors and Matrices October 2013 1 / 40 1. Geometrical vectors A geometrical vector p represents a point P in space. The point P is an


slide-1
SLIDE 1

Vectors and Matrices

Basilio Bona

DAUIN – Politecnico di Torino

October 2013

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 1 / 40

slide-2
SLIDE 2
  • 1. Geometrical vectors

A geometrical vector p represents a point P in space. The point P is an abstraction that often, but not always, requires a representation. Vector representations are given wrt a reference frame (see below) If P ∈ R3 (a 3D space) then pa ∈ R3 =   px py pz  

a

≡   p1 p2 p3  

a

pi is the vector i-th coordinate wrt the chosen reference frame Ra.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 2 / 40

slide-3
SLIDE 3

Affine geometry

To treat points as vectors in linear (vector) spaces implies the definition of a zero point (the origin), i.e., a point with particular privileged

  • characteristics. Since, in many applications, this is not always the case, a

particular geometry that is “origin-free” has been set up. It is called affine geometry and is defined on affine spaces. Affine geometry is at the base of projective geometry and perspective transforms, as well as homogeneous vectors. It will not be considered in the present context; the interested reader can find more details in [05].

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 3 / 40

slide-4
SLIDE 4
  • 2. Physical vectors

A physical vector − → QP represents a physical quantity, such as linear or angular velocity, gravitational acceleration, force, torque, etc. A physical vectors is an oriented segment (aka directed line segment), with an application point Q that can be free or constrained, a direction and a magnitude. − → QP may be reference-free (as, e.g., a physical entity independent from the way we represent it, and from an origin), but we are usually representing it by a vector vqp ∈ R3 = p−q =   p1 −q1 p2 −q2 p3 −q3   ≡   v1 v2 v3   that is the difference ot two geometrical vectors p ↔ P q ↔ Q Example: the local gravitational acceleration has direction and magnitude that are “absolute”, since they do not depend on the reference frame chosen, but on the space-time geometry.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 4 / 40

slide-5
SLIDE 5

Physical vectors

Figure: Physical vectors.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 5 / 40

slide-6
SLIDE 6

Physical vectors

We represents physical vectors with an icon; the most used icon is an arrow.

Figure: The vector icon.

This icon is sometimes misleading, as we will see, considering the symmetry properties of the physical vectors. There are two types of physical vectors: polar and axial ones.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 6 / 40

slide-7
SLIDE 7

Polar vectors

Polar vectors (see [01]) are physical vectors that are symmetrical wrt a reflection through a parallel plane, and are skew-symmetrical wrt a reflection through a perpendicular plane. Examples of physical polar vectors are displacements, linear velocities and forces.

Figure: Polar vector.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 7 / 40

slide-8
SLIDE 8

Axial vectors

Axial vectors are physical vectors that are skew-symmetrical wrt a reflection through a parallel plane, and are symmetrical wrt a reflection through a perpendicular plane. Examples of physical axial vectors are angular velocities and torques.

Figure: Axial vector.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 8 / 40

slide-9
SLIDE 9
  • 3. Mathematical vectors

Mathematical vectors are abstract entities belonging to vector spaces.

Vector Space

Given a field F = {F;+,·}, a vector space V(F), is the set of elements, called vectors, that satisfies the following axiomatic properties: Vector sum: the operation +, called vector sum, is defined so that {V(F);+} is a commutative (abelian) group; the identity element is called 0; v +0 = v Product by a scalar: For each α ∈ F and each v ∈ V(F), it exists a vector αv ∈ V(F);

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 9 / 40

slide-10
SLIDE 10

Vector space

For each α,β ∈ F and each v,w ∈ V(F) the following relations hold true: associative property wrt product by a scalar: α(βv) = (αβ)v existence of the identity wrt product by a scalar: 1(v) = v; ∀v distributive property wrt vector sum: α(v+w) = αv +αw distributive property wrt product by a scalar: (α +β)v = αv +βv

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 10 / 40

slide-11
SLIDE 11

Linear functions and dual spaces

Given two vector spaces, V(F) and U(F), both defined on the same field F, a function f : V → U is linear, if, for every v,w ∈ V and λ ∈ F the following axioms are true: f (v+w) = f (v)+f (w) = f v +f w f (λv) = λf (v) = λf v The linear function L : U → U is also called linear operator, linear transformation, linear application or endomorphism. The set of all linear functions L : U → V defines a linear vector space L(F). The set of all linear function L from V(F) to F (where usually F = R) L : V → R, defines a dual vector space, called V∗(F). Given a vector v ∈ V(F), the simplest example of dual vector v∗ ∈ V∗(F) is v ∗

1v1 +···+v ∗ nvn = v,v∗ = v∗,v;

f := v∗ = v ∗

1

··· v ∗

n

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 11 / 40

slide-12
SLIDE 12

Scalar product

The definition of vector spaces does not include a product between elements of the space. But when a metric (i.e., a measure) is necessary, usually it is that induced by the scalar product. Given two physical vectors a = − → QP,b = − → SR, the scalar product or inner product a·b is a real number defined (geometrically) as: a·b = a b cosθ where a is the vector length and θ, (0◦ ≤ θ ≤ 180◦) is the angle between a and b; some indicate the product as a,b (see also dual spaces). Given two mathematical vectors a,b ∈ V(R) the scalar product is defined as a·b = ∑

k

akbk = aTb

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 12 / 40

slide-13
SLIDE 13

Properties: distributive wrt sum (x+y)·z = x·z+y·z distributive wrt product by scalar α(x·y) = (αx)·y = x·(αy) commutative x·y = y ·x positive x·x > 0, ∀x = 0;x·x = 0 iff x = 0 Geometrical (physical) definition implies the concepts of angle and length, while in the mathematical setting norm is a quantity derived by the scalar product x = √x·x =

k

x2

k =

√ xTx and the angle between x and y is defined as θ = cos−1

  • x·y

x y

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 13 / 40

slide-14
SLIDE 14

Cross product

Scalar product · acts between two vectors and produces a scalar; in general we would like to define a product that produces a vector. If we stay in the 3D case, we can define the cross product, aka external product, or vectorial product. Given two physical 3D vectors a = − → QP,b = − → SR, the cross product c = a×b is a vector orthogonal to the plane of a,b, whose length is c = absinθ where θ is the minimum angle that takes a to b counterclockwise (right-hand rule). Given two mathematical vectors x = x1 x2 x3 T , y = y1 y2 y3 T , with x,y ∈ R3 the cross product x×y is a vector z such that z = x×y =   x2y3 −x3y2 x3y1 −x1y3 x1y2 −x2y1  

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 14 / 40

slide-15
SLIDE 15

This relation can be written as z = x×y =   x2y3 −x3y2 x3y1 −x1y3 x1y2 −x2y1   =   −x3 x2 x3 −x1 −x2 x1     y1 y2 y3   = S(x)y where S(x) is a skew-symmetric (skew-symmetric) matrix. Cross Product Properties: anticommutative x×y = −(y ×x) distributive wrt sum x×(y+z) = (x×y)+(x×z) distributive wrt product by a scalar α (x×y) = (αx)×y = x×(αy) non associative x×(y×z) = (x×y)×z Jacobi identity a×(b×c)+b×(c×a)+c×(a×b) = 0

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 15 / 40

slide-16
SLIDE 16

Given three 3D vectors x,y,z, the triple product is a non associative product: x×(y×z) = (x×y)×z with the following (Grassmann) identities: x×(y ×z) = (x·z)y −(x·y)z (x×y)×z = (x·z)y −(y·z)x The following relation (between scalars) holds as well (x×y)·z = −(z×y)·x The cross product is only defined in R3; in order to generalize it in higher dimensional spaces n > 3 it is necessary to introduce the Clifford Algebras.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 16 / 40

slide-17
SLIDE 17

Dyadic Product

Given two vectors x, y ∈ Rn, the dyadic product is defined as x⊗y = xyT = D(x,y) =   x1y1 ··· x1yn . . . xiyi . . . xny1 ··· xnyn   Properties (αx)⊗y = x⊗(αy) = α(x⊗y) x⊗(y+z) = x⊗y+x⊗z (x+y)⊗z = x⊗y+x⊗z (x⊗y)z = x(y ·z) x(y ⊗z) = (x·y)z

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 17 / 40

slide-18
SLIDE 18

Some texts call this product external product, adding “noise” to the nomenclature, since the external product is another type of product introduce by Grassmann. The product is non commutative: xyT = yxT, since D(x,y) = DT(y,x) The matrix D has always rank ρ(D) = 1, whatever its dimension n. Relations between dyadic and cross product x×(y ×z) = [(x·z)I−z⊗x]y (x×y)×z = [(x·z)I−x⊗z]y It is interesting to note that, while the cross product is only defined for 3D vectors, the right terms are defined for any dimension n.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 18 / 40

slide-19
SLIDE 19

Other vector products

Since the scalar product does not produce a vector, and the cross product is non-commutative, but also non-associative, there was the necessity to define a product ab between vectors possessing the majority of properties

  • f an ordinary product, i.e., the associative and distributive properties,

while the commutativity was not considered essential. Moreover the norm equality must be true, i.e., ab = ab. Many products were defined with these properties, but the two most common (in computer vision, kinematics, and quantum physics) are the Hamilton product and the Clifford product.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 19 / 40

slide-20
SLIDE 20

Hamilton product

Hamilton product finds its reason in the context of quaternion product. The product c = ab is axiomatically defined as c = ab = −a·b+a×b This product has now only an historical significance, since it has the unpleasant characteristic to produce a negative number for the product of a vector by itself aa = −a·a+a×a = −a2

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 20 / 40

slide-21
SLIDE 21

Clifford Product

As reported in [04], a vector product satisfying the same axioms of the real numbers product (distributivity, associativity and commutativity) does not exist for vector spaces with dimension n ≥ 3. Dropping the commutativity axiom, it is possible to define the Clifford product (from William Clifford, 1845-1879). It allows to extend the cross (external) product to vector spaces Rn,n > 3. Indeed the Clifford product was already introduced some years before by Hermann Grassmann, the inventor of the exterior algebra.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 21 / 40

slide-22
SLIDE 22

Bivectors

Starting from R2, given two vectors a = a1i+a2j, and b = b1i+b2j, Clifford product is defined as: ab = a1b1 +a2b2 +(a1b2 −a2b1)e12 = a·b+(a1b2 −a2b1)e12 where e12 is a bivector and is to be understood as the signed unit area of the parallelogram with sides i and j. This is analog to the cross product i×j, apart that this last is an axial vector orthogonal to the i,j plane, while the former is a so-called patch of the same plane as shown in Figure.

Figure: The bivector e12 in R3.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 22 / 40

slide-23
SLIDE 23

The Clifford product is often written using the symbols introduced by Grassmann, i.e., ab = a·b+a∧b where a∧b = (a1b2 −a2b1)i∧j is the so called wedge product or exterior product that shall not be confused with the cross product a×b. As said before, a∧b is a directed area, while a×b is an axial vector. Moreover, while a×b is undefined outside R3, the wedge product can be defined for any n-dimensional space Rn, where it can be interpreted as an area patch, a volume patch, a higher dimensional patch, etc.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 23 / 40

slide-24
SLIDE 24

In R3 if one assumes that the following identity holds: cc = c2 = c·c where · is the scalar product assuming c = a+b, then: (a+b)(a+b) = (a+b)·(a+b) aa+ab+ba+bb = a·a+a·b+b·a+b·b a2 +ab+ba+b2 = a2 +2a·b+b2 hence ab+ba = 2a·b and finally ab = 2a·b−ba

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 24 / 40

slide-25
SLIDE 25

Applications – Differential geometry

One of the principal applications of the exterior algebra is in differential geometry where it is used to define the bundle of differential forms on a smooth manifold. In the case of a (pseudo-)Riemannian manifold, the tangent spaces come equipped with a natural quadratic form induced by the metric. Thus, one can define a Clifford bundle in analogy with the exterior bundle. This has a number of important applications in Riemannian geometry. Perhaps more importantly is the link to a spin manifold, its associated spinor bundle and spinor manifolds.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 25 / 40

slide-26
SLIDE 26

Applications – Physics

Clifford algebras have numerous important applications in physics. Physicists usually consider a Clifford algebra to be an algebra spanned by the so-called Dirac matrices γ1,...,γ4 where γiγj +γjγi = 2ηijI where η = ηij

  • is the matrix of a quadratic form, having signature (p,q),

typically (1,3) when working in Minkowski space (i.e., (+,−,−,−)). The Dirac matrices were first written down by Paul Dirac when he was trying to write a relativistic first-order wave equation for the electron, and provide an explicit isomorphism from the Clifford algebra to the algebra of complex matrices. The result was used to define the Dirac equation and introduce the Dirac operator. The entire Clifford algebra shows up in quantum field theory in the form of Dirac field bilinears.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 26 / 40

slide-27
SLIDE 27

In mathematical physics, the gamma matrices, γ1,γ2,γ3,γ4, also known as the Dirac matrices, are a set of conventional matrices with specific anticommutative relations that ensure they generate a matrix representation of the Clifford algebra Cℓ1,3. When interpreted as the matrices of the action of a set of orthogonal basis vectors for contravariant vectors in Minkowski space, the column vectors on which the matrices act become a space of spinors, on which the Clifford algebra of space time acts. Spinors facilitate space-time computations in general, and in particular are fundamental to the Dirac equation for relativistic spin-1/2 particles. In Dirac representation, the four contravariant gamma matrices are

γ1 =    1 1 −1 −1   ; γ2 =    1 1 −1 −1    γ3 =    −j j j −j   ; γ4 =    1 −1 −1 1   

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 27 / 40

slide-28
SLIDE 28

Applications – Computer Vision

Recently, Clifford algebras have been applied in the problem of action recognition and classification in computer vision. Some authors propose a Clifford embedding to generalize traditional MACH filters to video (3D spatiotemporal volume), and vector-valued data such as optical flow. Vector-valued data is analyzed using the Clifford Fourier transform. Based

  • n these vectors action filters are synthesized in the Clifford Fourier

domain and recognition of actions is performed using Clifford Correlation. The authors demonstrate the effectiveness of the Clifford embedding by recognizing actions typically performed in classic feature films and sports broadcast television.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 28 / 40

slide-29
SLIDE 29

Skew-symmetric matrices

Skew-symmetric matrix

A square matrix S is called skew-symmetric or antisymmetric when S+ST = O

  • r

S = −ST A skew-symmetric matrix has the following structure An×n =     s12 ··· s1n −s12 ··· s2n . . . . . . ... . . . −s1n −s2n ···     Therefore there it has at most n(n −1) 2 independent elements.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 29 / 40

slide-30
SLIDE 30

Skew-symmetric matrices

For n = 3 it results n(n −1) 2 = 3, hence an skew-symmetric matrix has as many element as a 3D vector v. Given a vector v = v1 v2 v3 T it is possible to build S, and given a matrix S it is possible to extract the associated vector v. We indicate this fact using the symbol S(v), where, by convention S(v) =   −v3 v2 v3 −v1 −v2 v1  

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 30 / 40

slide-31
SLIDE 31

Skew-symmetric matrices

Some properties: Given any vector v ∈ R3: ST(v) = −S(v) = S(−v) Given two scalars λ1,λ2 ∈ R: S(λ1u+λ2v) = λ1S(u)+λ2S(v) Given any two vectors v,u ∈ R3: S(u)v = u×v = −v×u = S(−v)u = ST(v)u Therefore S(u) is the representation of the operator (u×) and viceversa.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 31 / 40

slide-32
SLIDE 32

Skew-symmetric matrices

The matrix S(u)S(u) = S2(u) is symmetrical and S2(u) = uuT −u2 I Hence the dyadic product can be written as D(u,u) = uuT = S2(u)+u2 I

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 32 / 40

slide-33
SLIDE 33

Eigenvalues and eigenvectors of skew-symmetric matrices

Given an skew-symmetric matrix S(v), its eigenvalues are λ1 = 0, λ2,3 = ±jv The eigenvalue related to the eigenvector λ1 = 0 is v; the other two are complex conjugate. The set of skew-symmetric matrices is a vector space, denoted as so(3). Given two skew-symmetric matrices S1 and S2, we call commutator or Lie bracket the following operator [S1,S2] def = S1S2 −S2S1 that is itself skew-symmetric. Skew-symmetric matrices form a Lie algebra, which is related to the Lie group of orthogonal matrices.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 33 / 40

slide-34
SLIDE 34

Orthogonal matrices

A square matrix A ∈ Rn is called orthogonal when ATA =     α1 ··· α2 ··· . . . . . . ... . . . ··· αn     with αi = 0. A square orthogonal matrix U ∈ Rn is called orthonormal when all the constants αi are 1: UTU = UUT = I Therefore U−1 = UT

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 34 / 40

slide-35
SLIDE 35

Orthonormal matrices

Other properties: The columns, as well as the rows, of U are orthogonal to each other and have unit norm. U = 1; The determinant of U has unit module: |det(U)| = 1 therefore it can be +1 or −1. Given a vector x, its orthonormal transformation is y = Ux.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 35 / 40

slide-36
SLIDE 36

Orthonormal matrices

If U is an orthonormal matrix, then AU = UA = A. This property in general valid also for unitary matrices, i.e., those defined as U∗U = I. When U ∈ R3×3, only 3 out of its 9 elements are independent. Scalar product is invariant to orthonormal transformations, (Ux)·(Uy) = (Ux)T(Uy) = xTUTUy = xTy = x·y This means that vector lengths are invariant wrt orthonormal trasformations Ux = (Ux)T(Ux) = xTUTUx = xTIx = xTx = x

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 36 / 40

slide-37
SLIDE 37

Orthonormal matrices

When considering orthonormal transformations, it is important to distinguish the two cases: When det(U) = +1, U represents a proper rotation or simply a rotation, when det(U) = −1, U represents an improper rotation or reflection. The set of rotations forms a continuous non-commutative (wrt product) group; the set of reflections do not have this “quality”. Intuitively this means that infinitesimal rotations exist, while infinitesimal reflections do not have any meaning. Nonetheless, reflections are the most basic transformation in 3D spaces, in the sense that translations, rotations and roto-reflections (slidings) are

  • btained from the composition of two or three reflections
  • B. Bona (DAUIN)

Vectors and Matrices October 2013 37 / 40

slide-38
SLIDE 38

Figure: Reflections producing rotations and translation in R2.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 38 / 40

slide-39
SLIDE 39

Orthonormal matrices

If U is an orthonormal matrix, the distributive property wrt the cross product holds: U(x×y) = (Ux)×(Uy) (with general A matrices this is not true). For any proper rotation matrix U and a generic vector x the following holds US(x)UTy = U

  • x×(UTy)
  • =

(Ux)×(UUTy) = (Ux)×y = S(Ux)y where S(x) is the skew-symmetric matrix associated with x; therefore: US(x)UT = S(Ux) US(x) = S(Ux)U

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 39 / 40

slide-40
SLIDE 40

References

[01] S.L. Altmann, Icons and Symmetries, Clarendon Press, 1992. [02] Van Der Ha, Shuster, A Tutorial on Vectors and Attitude. [03] K. J¨ anich, Linear Algebra, Springer, 1994. [04] J. Stillwell, Mathematics and Its History, Springer, 2002. [05] J. Gallier, Geometric Methods and Applications, Springer, 2001.

  • B. Bona (DAUIN)

Vectors and Matrices October 2013 40 / 40