[Insight-developers] itkPoint from a math perspective

Miller, James V (CRD) millerjv@crd.ge.com
Wed, 18 Jul 2001 14:02:35 -0400


Luis,

One last question on these definitions:

You mention that Covariant means something that changes in the same way as the reference frame and
Contravariant means something that changes in a different way from the reference frame.

Now we have already said that normals and gradients are transformed differently than vectors and
points.  

Now, enter my confusion: Why are normals and gradients "Contravariant" vectors?

Jim



-----Original Message-----
From: Luis Ibanez [mailto:ibanez@cs.unc.edu]
Sent: Wednesday, July 18, 2001 1:07 PM
To: George Stetten; insight
Subject: Re: [Insight-developers] itkPoint from a math perspective



George,

"Covariance" has a different sense in 
statistics when you compute the covariance
matrix using these outer products.

----

The geometric term means:

"Co-variant" = something that changes in the same
               way as the reference frame does

"Contra-variant" = changing in a different way
                   that the reference frame.

Let's say we have a vector base composed of 
two unitary vectors xu and yu (it would be
nice to have latex equations in emails... :-)

An arbitrary vector V is expressed as a linear
combination of xu and yu. The coefficients of V
in this linear combinations are the components of
V in the (xu,yu) base.

       V = Vx * xu  + Vy * yu

That's pretty much trivial in cartesian coordinates,
but is more fun in non-orthogonal systems   :-)

The components Vx and Vy of the vector V, are called
"Contravariant" components of V. Because when a 
transformation is applied to the space, the components
Vx,Vy will change in the opposite way xu,yu will change.

For example, if the transformation is a scale*2 in Y,
the base vectors will now look like:
 
   xu'  =     xu
   yu'  = 2 * yu

Now, if you want to express the same vector V in the 
new base (xu',uy') new components have to be computed.
They will be:

   Vx'  =         Vx
   Vy'  = (1/2) * Vy

So that:

   V = Vx  * xu  + Vy  * yu 
     = Vx' * xu' + Vy' * yu'


The fact that Vy is divided by 2 when yu is multiplied
by 2, is what makes it "contra-variant".

A covariant vector, on the other hand, has "covariant"
components, so when the base vector is scaled by 2, the
covariant component is *also* scaled by 2.

Strictly speaking, any vector could be written in 
"covariant" components or in "contravariant" component.
This is a property of the components, not a property of
the vector itself.


The scalar product is defined between covariant
components and contra-variant components, that's the
reason why scalar products are invariant to linear 
transformations. The change in the covariant components
is compensated by the change in the contra-variant ones.


We don't use to worry about these details because most
of the time we are using an orthogonal reference system
with unitary vector, but as soon as we apply an affine 
transform, all these things become relevant again.


Luis


------


George Stetten wrote:
> 
> Luis,
> 
> Thanks for your (usual) thoughtful reply.
> 
> What you call "Covariance" I usually call "Codimension."  I'm not sure how the
> concept of covariance applies to vectors normal to a surface, but I immagine it's
> explained in the book you reference.
> 
> Covariance is something we use in a different way.  We generate a covariance matrix
> by summing the outer
> products of unit vectors with themselves, to analyze populations of orientation
> measurements.
> 
> George
>

_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers