Covariance and contravariance

  • Thread starter Hymne
  • Start date
  • Tags
    Covariance
In summary, the conversation revolved around understanding concepts related to coordinate systems, tangent spaces, and cotangent spaces on a manifold. The main idea is that for each point on the manifold, there is a tangent space and a cotangent space, and these are related through a metric function. Changing the basis of a coordinate system also changes the associated basis of the tangent space and the components of tangent and cotangent vectors. This is where the terms "covariant" and "contravariant" come from. By understanding these concepts, it becomes easier to express contravariant coordinates in terms of cartesian coordinates.
  • #1
Hymne
89
1
Hi! I´m trying to get an intuition for these concepts and was just playing at home.
My thought was to start with a 2-Dimensional ON-coordinatesystem, the xy-plane and do the following:

1. Study the vector with the coordinate (1,1) in this system. Now its cov. and con. coordinates is of course in the start the same.

2. Start by imagine that we decrease the angle between the positive part och y and x axis. This means that we get a oblique system and we have a diffrence between cov. and con.

3. What should we see? Well, Take the covariant coordinates x = r cos (v) etc.. and differentiate them with respect to the angle, dv.

4. Do the same thing for the contravariant coordinates (here I tried to do it by expressing them through the elements of the transformation matrix). If the length is invariant and can be expressed by x_i x^i. We should see that the derivatives cancel each other so that:

x_i * (d x^i / dv) = x^i * (d x_i / dv) since (d [x^i x_i] / dv) = 0.

Now to the questions!
Do you see any wrong with my arguments here?
Is there any easier way to express the contravariant coordinates through the cartesian x and y?
Can you show that x_i x^i is invariant when we decrease the angle v in some much easier way?
 
Last edited:
Physics news on Phys.org
  • #2
I'm not sure I understand what you're doing. For example, if you tilt the y-axis by 45 degrees, doesn't that put the point previously known as (1,1) on the y axis, ensuring that xixi=0? Your terminology is also a bit strange. There's no such thing as covariant and contravariant coordinates. There are just "coordinates". Maybe you're thinking of the components of cotangent vectors and cotangent vectors respectively.

Let me just outline the modern approach to these things. If there's something you want me to clarify, just ask. If you don't have time to study this, that's OK with me. Questions about this sort of thing come up often enough that I would like to have a post that I can direct people to when they ask questions about the covariant/contravariant stuff.
A manifold is a set with some other stuff defined on it, the most important being coordinate systems. They are functions that assign an n-tuple of real numbers to each point in the manifold. For example, the coordinate system x takes the point p to (x1(p),...,xn(p)).

For each point p in the manifold M, we define an n-dimensional vector space TpM, called the tangent space at p. The members of TpM are called tangent vectors at p. For any finite-dimensional real vector space V, its dual space V* is defined as the set of linear functions from V into the set of real numbers. (This set is given a vector space structure in the obvious way). The dual space TpM* of TpM is called the cotangent space at p, and its members are called cotangent vectors at p.

Tangent vectors are sometimes just called "vectors". Cotangent vectors are sometimes called "covectors". Tangent vectors and cotangent vectors also go by the horrible names "contravariant vectors" and "covariant vectors" respectively. Those terms belong to an obsolete way of dealing with these things.

The metric at p is a function g:TpM×TpM→ℝ that's linear in both variables and satisfies g(u,v)=g(v,u) and one more thing that I'll mention in a minute. For each u, the function that takes v to g(u,v) is a linear function from TpM into ℝ. That makes that function, which is often written as g(u,·), a member of TpM*. The metric is required (as a part of its definition) to also have the property that the function that takes u to g(u,·), is a vector space isomorphism from TpM into TpM*.

This isomorphism ensures that for each tangent vector v, there's a "corresponding" cotangent vector g(v,·), and that for each cotangent vector, there's a corresponding tangent vector, given by the inverse of the function that takes v to g(v,·).

When tangent vectors are expressed in terms of a basis, it's conventional to put the indices on the components upstairs and the indices on the basis vectors downstairs. For example, if {ei} is a basis, then v=viei. For cotangent vectors, the convention is the opposite. If {fi} is a basis, then ω=ωifi.

Given a basis {ei} of TpM, we can define a basis {ei} of TpM*, called the dual basis of {ei}, by ei(ej)=δij.

Suppose that {fi} is another basis for TpM. Then there's always a matrix B such that fi=Bjiej, where Bji is the component on row j, column i, of the matrix B. It's easy to show that this implies fi=(B-1)ijej. So when you change a basis of TpM as described by a matrix B, the dual basis changes as described by B-1.

It's also easy to show that if you change the basis of TpM in the way described by B, the components of each tangent vector change as described by B-1. As I already mentioned, a change of basis in the way described by B also changes the dual basis in the way described by B-1, and this means that the components of each cotangent vector change as described by B. This is the source of the terms "covariant" and "contravariant". Change the basis by B, the components of a tangent vector change by B-1 (hence "contravariant"), and the components of a cotangent vector change by B (hence "covariant").

So what does this have to do with coordinate systems? We can use each coordinate system to construct n partial derivative operators, and we can show that these operators form a basis for the tangent space. So when you change the coordinate system, you also change the associated basis of the tangent space.

These are some of my earlier posts that explain the details of some of these things:

https://www.physicsforums.com/showthread.php?p=2328304
https://www.physicsforums.com/showthread.php?p=1743299
https://www.physicsforums.com/showthread.php?p=2815771
 
Last edited:
  • #3
Holy molly that's a good anwser!
Thank you very much.

I think that I´ve just been studying the property which you write:

Given a basis {ei} of TpM, we can define a basis {ei} of TpM*, called the dual basis of {ei}, by ei(ej)=δij.

And looking at the geometric relationship between these two kind of basis sets.

However I have some questions. :approve:
Tangent space.. can I view this as a room which exhibits the properties that we find in an infinitesimal region around p?
Like a plane just touching the sphere, if that now was too be our M.


The problem seems to be that I´ve only been introduced to this subject throught Special relativity, and not taken a course in GR where the curvature comes in.
In my cases the metic is a diagonalmatrix, invariant over the manifold (which is spacetime?).. Will this matrix vary in diffrent points in GR later?



Hahah thank you very much Fredrik this is damn beautiful...

I´ve also read some Lie algebra where the manifold and tangetspace comes in again.. could you maybe comment something about this? Right now i see lie algebra as the case where we deal with manifolds which represents continuous operations, like rotation, and therefore expect some properties, as jacobi identitiy etc.
And this differential geometry as the case where we have a physical space. Where we don't expect the same properties..
 
  • #4
One more question:

You write:
This isomorphism ensures that for each tangent vector v, there's a "corresponding" cotangent vector g(v,·), and that for each cotangent vector, there's a corresponding tangent vector, given by the inverse of the function that takes v to g(v,·).

Does this also guarantee that we always can find a dualbasis for the basis X in T_pM?
 
  • #5
Hymne said:
Holy molly that's a good anwser!
Thank you very much.

However I have some questions. :approve:
Tangent space.. can I view this as a room which exhibits the properties that we find in an infinitesimal region around p?
Like a plane just touching the sphere, if that now was too be our M.
The sphere is a nice example. If you would define vectors on a sphere, how would you do that? Vectors can be added, but the natural question then is: how do you compare vectors at different points on the sphere? The question is that this is ambiguitous (but it can be done via a connection!).

It turns out that the natural thing to do is to consider the tangent space at each point on the sphere, and declare that vectors live in that space. Your "plane touching the sphere" is a good visualization of it. In this plane, vectors can be added. But to compare different tangent spaces, you need a description how to "drag" vectors from one tangent space to another, and that can be done in many different ways!

In my cases the metic is a diagonalmatrix, invariant over the manifold (which is spacetime?).. Will this matrix vary in diffrent points in GR later?
Yes.

I´ve also read some Lie algebra where the manifold and tangetspace comes in again.. could you maybe comment something about this? Right now i see lie algebra as the case where we deal with manifolds which represents continuous operations, like rotation, and therefore expect some properties, as jacobi identitiy etc.
And this differential geometry as the case where we have a physical space. Where we don't expect the same properties..

A group G can be considered as a manifold with some extra structure. The Lie algebra can then be seen as the tangent space at the identity e of G. This picture can be usefull. A nice question, for instance, is: If I have a homomorphism between two groups, does this induce a homomorphism between the two algebras? It turns out that this depends on the topology of the group seen as a manifold (the group manifold has to be simply connected). This question is relevant, because e.g. representations are homomorphisms.
 
  • #6
Hymne said:
One more question:

You write:


Does this also guarantee that we always can find a dualbasis for the basis X in T_pM?

The dual basis is the basis of the cotangent space. This dual of the tangent space is really a different vector space!

Compare it with bra's and kets in QM. Bra's and kets are really different beasts living in different spaces.
 
  • #7
haushofer said:
The dual basis is the basis of the cotangent space. This dual of the tangent space is really a different vector space!

Compare it with bra's and kets in QM. Bra's and kets are really different beasts living in different spaces.
Ah, thnx. Is this the natural generalisation when doing QFT on curved space? That the bras are contravariant components and the kets covariant components.
 
  • #8
Can I recommend looking at

Tensor Geometry

By Dodson and Poston.

You will find much meat to chew on here.
 
  • #9
Hymne said:
Tangent space.. can I view this as a room which exhibits the properties that we find in an infinitesimal region around p?
Like a plane just touching the sphere, if that now was too be our M.
Yes, that's a good way to picture it. It is however important to understand that the definition of an n-dimensional manifold doesn't require it to be embedded in an n+1-dimensional Euclidean space like this picture suggests. The tangent space at p is defined abstractly. There are several different ways to do it. The last link in my previous post is to a post that describes one of those ways, and contains a link to a post that describes another way.

Hymne said:
The problem seems to be that I´ve only been introduced to this subject throught Special relativity, and not taken a course in GR where the curvature comes in.
In my cases the metic is a diagonalmatrix, invariant over the manifold (which is spacetime?).. Will this matrix vary in diffrent points in GR later?
Let [itex]g_p[/itex] be the metric at p, and [itex]{e_i}[/itex] the basis of [itex]T_pM[/itex] associated with some coordinate system x. Then the components of [itex]g_p[/itex] in x are defined by [itex]g_{ij}(p)=g_p(e_i,e_j)[/itex]. In SR, we have [itex]g_{ij}(p)=\eta_{ij}[/itex] for all p, if and only if the coordinate system is a global inertial frame. If not, the components depend on p, even in SR. In GR, they pretty much always depend on p, no matter what coordinate system you use.

The [itex]\eta_{ij}[/itex] above are the components of the matrix

[tex]\eta=\begin{pmatrix}-1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 1\end{pmatrix}[/tex]

Note that the metric at p isn't defined as a matrix. It's a bilinear form. It is however useful to define the matrix of its components in a coordinate system, and the metric at p is completely determined by that matrix.

Hymne said:
I´ve also read some Lie algebra where the manifold and tangetspace comes in again.. could you maybe comment something about this?
A Lie group is a group that's also a manifold. A Lie algebra is a vector space V, with a function [itex](x,y)\mapsto [x,y][/itex] from V×V into V, that's bilinear and satisfies the Jacobi identity: [x,[y,z]]+[y,[z,x]]+[z,[x,y]]=0. (So it's like a distributive multiplication operation, but instead of being associative, it satisfies the Jacobi identity). Such a function is called a Lie bracket.


I'm going to describe how to define a Lie bracket on the vector space [itex]\mathfrak g=T_eG[/itex] of a Lie group G. (That's the tangent space at the identity element). We need a few definitions first. Suppose that M and N are manifolds and that [itex]\phi:M\rightarrow N[/itex]. If f is a real-valued function on N, then [itex]f\circ\phi[/itex] is a real-valued function on M, called the pullback of f. We can use the function [itex]\phi[/itex] to define a function [itex]\phi_*:T_pM\rightarrow T_{\phi(p)}N[/itex], called a pushforward. Recall that tangent vectors at a point are defined as "derivations" at that point, so to specify a tangent vector at [itex]\phi(p)[/itex], we need to specify its action on an arbitrary real-valued function f:

[tex]\phi_* v(f)=v(f\circ\phi)[/tex].

A vector field is a function that takes each point p (in some open subset of a manifold) to a tangent vector at p. If X is a vector field, the corresponding tangent vector at p is written as Xp. For every real-valued function f, the function that takes p to Xpf is written as Xf. The commutator of two vector fields X and Y is another vector field, defined by

[tex][X,Y]_pf=X_p(Yf)-Y_p(Xf)[/tex]

A pushforward of a vector field is defined in terms of the pushforwards of tangent vectors:

[tex](\phi_*X)_{\phi(p)}=\phi_*X_p[/tex].

Recall that a Lie group G is also a group. For each g in G, we define left multiplication by g as the function [itex]\lambda_g:G\rightarrow G[/itex] defined by

[tex]\lambda_g(h)=gh[/tex]

Now we have all the tools we need. Suppose that [itex]K,L\in\mathfrak g[/itex]. Then [itex]\lambda_g_*K\in T_gG[/itex]. We define the left-invariant vector field corresponding to K by

[tex]X^K_g=\lambda_g_*K[/tex]

and the Lie bracket on [itex]\mathfrak g[/itex] by

[tex][K,L]=[X^K,X^L]_e[/tex]


I hope it's obvious that I have omitted some minor technicalities (e.g. I never mentioned that "left multiplication by g" is required to be a smooth function by the definition of "Lie group"). If you're wondering if I could have used right multiplication instead of left, the answer is yes. The result would have been a Lie algebra that's isomorphic to this one.
 
Last edited:
  • #10
that takes each point p

A small philosophical point (:smile:) here Fredrik.

I prefer the expression "associates with each point p" rather than the operator language which suggests that once the operation is concluded you no longer have the original.

In fact the uses we want here mean that we must have both the original and the resultant of the association together.

Otherwise I admire your hard work in the posts.
 
  • #11
Hymne said:
Ah, thnx. Is this the natural generalisation when doing QFT on curved space? That the bras are contravariant components and the kets covariant components.
"Contra" and "co" says something about how the components of an object transform under coordinate transformations; if the objects transform oppositely to the basis vectors you call the components "contravariant", and if they transform the same as the basis vectors then you call them "covariant". This can be defined for any vector space, so I would say also for Hilbert spaces. Mathematicians would speak about "vectors" and "covectors", living in the tangent and cotangent space; the vectors themselves don't change under these transformations, because they are defined without any reference to coordinates. Coordinates are just labels!

These covectors are functionals acting on vectors, giving back a number. And vice versa. That's the analogy with bra's and kets; if I have a bra <x|, I can act with it on a ket |x> to obtain

<x|y> = ...

which is a complex number in QM. Because under a unitary transformation

|x> --> U |x>

and

<y| --> <y|U^{-1}

this thing <x|y> is invariant under these unitary transformations.

In the same way you can view a dual vector omega as a functional acting on a vector X to give back a number,

omega(X) = ...

where the brackets mean "acting on". Or the other way around,

X(omega) = ...
 
  • #12
Hymne said:
Ah, thnx. Is this the natural generalisation when doing QFT on curved space? That the bras are contravariant components and the kets covariant components.
No, it has nothing to do with that. Bra-ket notation is just a useful tool to simplify some calculations. This is what I wrote about bra-ket notation last year.
 
  • #13
Fredrik said:
I'm going to describe how to define a Lie bracket on the vector space [itex]\mathfrak g=T_eG[/itex] of a Lie group G. (That's the tangent space at the identity element). We need a few definitions first. Suppose that M and N are manifolds and that [itex]\phi:M\rightarrow N[/itex]. If f is a real-valued function on N, then [itex]f\circ\phi[/itex] is a real-valued function on M, called the pullback of f. We can use the function [itex]\phi[/itex] to define a function [itex]\phi_*:T_pM\rightarrow T_{\phi(p)}N[/itex], called a pushforward. Recall that tangent vectors at a point are defined as "derivations" at that point, so to specify a tangent vector at [itex]\phi(p)[/itex], we need to specify its action on an arbitrary real-valued function f:

[tex]\phi_* v(f)=v(f\circ\phi)[/tex].

What exactly is v(f) here? :/
 
  • #14
Studiot said:
Can I recommend looking at

Tensor Geometry

By Dodson and Poston.

You will find much meat to chew on here.

I actually bought Introduction to Smooth Manifolds by John Lee last monday, any experience with it? Should arrive tomorrow.
 
  • #15
Hymne said:
What exactly is v(f) here? :/
v doesn't act on f. (It can't, because v is a tangent vector at a point of M, while f is a real-valued function on N).

[itex]\phi_*[/itex] acts on v (a tangent vector at p) and the result is a tangent vector at [itex]\phi(p)[/itex]. That tangent vector (which we write as [itex]\phi_*v[/itex]) acts on f.

Hymne said:
I actually bought Introduction to Smooth Manifolds by John Lee last monday, any experience with it? Should arrive tomorrow.
It's very good. The only problem is that it doesn't cover connections, covariant derivatives, and curvature. I guess he didn't want to include that, since he had already written a book about those things, "Riemannian manifolds: an introduction to curvature", which is also excellent.
 
  • #16
Ah, included Riemannian manifolds and topological manifolds also. Maybe should start with one of those... I am writing a summary of all the good posts in swedish now but will come back tomorrow if anthing isn´t clear.

Thanks again! Maybe I can't repay you guys in some way but I pass it forward by volunteering as math teacher each monday :biggrin:

Peace out!
 
  • #17
Introduction to Smooth Manifolds by John Lee

Sorry, don't know that one. Perhaps someone else can comment, or you can do a critique when you've read it.

D & P are unusual as they offer a blend of maths and physics perspectives, rather than just one or the other, so the maths is not too stuffy. Relativity is covered.
 
  • #18
Hymne said:
Ah, included Riemannian manifolds and topological manifolds also. Maybe should start with one of those...
If you can live with not knowing exactly what "Hausdorff and second countable topological space" means, you can start with the book on smooth manifolds. Read enough of that to ensure that you understand tensor fields. After that you can start reading sections here and there in all three books, depending on what you're the most interested in for the moment.
 
  • #19
Fredrik said:
I'm not sure I understand what you're doing. For example, if you tilt the y-axis by 45 degrees, doesn't that put the point previously known as (1,1) on the y axis, ensuring that xixi=0? Your terminology is also a bit strange. There's no such thing as covariant and contravariant coordinates. There are just "coordinates". Maybe you're thinking of the components of cotangent vectors and cotangent vectors respectively.

Let me just outline the modern approach to these things. If there's something you want me to clarify, just ask. If you don't have time to study this, that's OK with me. Questions about this sort of thing come up often enough that I would like to have a post that I can direct people to when they ask questions about the covariant/contravariant stuff.



A manifold is a set with some other stuff defined on it, the most important being coordinate systems. They are functions that assign an n-tuple of real numbers to each point in the manifold. For example, the coordinate system x takes the point p to (x1(p),...,xn(p)).

For each point p in the manifold M, we define an n-dimensional vector space TpM, called the tangent space at p. The members of TpM are called tangent vectors at p. For any finite-dimensional real vector space V, its dual space V* is defined as the set of linear functions from V into the set of real numbers. (This set is given a vector space structure in the obvious way). The dual space TpM* of TpM is called the cotangent space at p, and its members are called cotangent vectors at p.

Tangent vectors are sometimes just called "vectors". Cotangent vectors are sometimes called "covectors". Tangent vectors and cotangent vectors also go by the horrible names "contravariant vectors" and "covariant vectors" respectively. Those terms belong to an obsolete way of dealing with these things.

The metric at p is a function g:TpM×TpM→ℝ that's linear in both variables and satisfies g(u,v)=g(v,u) and one more thing that I'll mention in a minute. For each u, the function that takes v to g(u,v) is a linear function from TpM into ℝ. That makes that function, which is often written as g(u,·), a member of TpM*. The metric is required (as a part of its definition) to also have the property that the function that takes u to g(u,·), is a vector space isomorphism from TpM into TpM*.

This isomorphism ensures that for each tangent vector v, there's a "corresponding" cotangent vector g(v,·), and that for each cotangent vector, there's a corresponding tangent vector, given by the inverse of the function that takes v to g(v,·).

When tangent vectors are expressed in terms of a basis, it's conventional to put the indices on the components upstairs and the indices on the basis vectors downstairs. For example, if {ei} is a basis, then v=viei. For cotangent vectors, the convention is the opposite. If {fi} is a basis, then ω=ωifi.

Given a basis {ei} of TpM, we can define a basis {ei} of TpM*, called the dual basis of {ei}, by ei(ej)=δij.

Suppose that {fi} is another basis for TpM. Then there's always a matrix B such that fi=Bjiej, where Bji is the component on row j, column i, of the matrix B. It's easy to show that this implies fi=(B-1)ijej. So when you change a basis of TpM as described by a matrix B, the dual basis changes as described by B-1.

It's also easy to show that if you change the basis of TpM in the way described by B, the components of each tangent vector change as described by B-1. As I already mentioned, a change of basis in the way described by B also changes the dual basis in the way described by B-1, and this means that the components of each cotangent vector change as described by B. This is the source of the terms "covariant" and "contravariant". Change the basis by B, the components of a tangent vector change by B-1 (hence "contravariant"), and the components of a cotangent vector change by B (hence "covariant").

So what does this have to do with coordinate systems? We can use each coordinate system to construct n partial derivative operators, and we can show that these operators form a basis for the tangent space. So when you change the coordinate system, you also change the associated basis of the tangent space.

These are some of my earlier posts that explain the details of some of these things:

https://www.physicsforums.com/showthread.php?p=2328304
https://www.physicsforums.com/showthread.php?p=1743299
https://www.physicsforums.com/showthread.php?p=2815771



Why is that is not clear to me.
What if we do not write it this way? Also I read that perpendicular component actually has a basis of 1/ei for e^i as contra. That adds to confusion.

Also I do not understand why perpendicular component is regarded as gradient where basis are at bottom where as they are at top for contra.

I somehow cannot correlate the two.
Thanks for your help
 
  • #20
"Contra" and "co" says something about how the components of an object transform under coordinate transformations; if the objects transform oppositely to the basis vectors you call the components "contravariant" said:
Can you clarify this more? This has been a constant source of my confusion.
 
  • #21
Gadhav said:
Why is that is not clear to me.
What if we do not write it this way?
What does "that" and "it" refer to? You quoted a 13-paragraph post that summarizes the basics of differential geometry, so it's impossible for me to know what you mean.

Gadhav said:
Also I read that perpendicular component actually has a basis of 1/ei for e^i as contra. That adds to confusion.
I'm not familiar with what you're talking about here. If you want an answer to this, I think you will have to provide an exact quote of the stuff you read.

Gadhav said:
Fredrik said:
"Contra" and "co" says something about how the components of an object transform under coordinate transformations; if the objects transform oppositely to the basis vectors you call the components "contravariant", and if they transform the same as the basis vectors then you call them "covariant".
Can you clarify this more? This has been a constant source of my confusion.
It's in the first post I linked to in the post you quoted, but I'll cover it very briefly here. Here I'll denote row i, column j of a matrix X by ##X^i_j##. Recall that the definition of matrix multiplication says that ##(AB)^i_j=A^i_k B^k_j##. Suppose that M is a matrix that defines a change of basis: ##\vec e'_i=M^j_i \vec e_j##. A vector ##v## in the vector space for which ##\{e_i\}## is a basis can be expressed in terms of either of the two bases:
\begin{align}
&v=v^i\vec e_i=v'^i\vec e'_i=v'^i M^j_i \vec e_j\\
&v^j=M^j_i v'^i\\
&v'^i=(M^{-1})^i_j v^j
\end{align} So vector components transform as described by the inverse of the matrix that describes the transformation of the basis vectors.
 
  • #22
I reading reading about this a little more and I see that when you write A(new) = X*B(old) where X = transformation matrix, it is written as dx(new)/dx(old) which makes sense to me but I cannot understand why that is same as basis vector ei. Can someone throw some light on that?
As a part of this Q, I also see that metric tensor g(ij) is written as ei.ej = dxi(bar)/dxj * dxm(bar)/dxn where (bar) are new co-ordinates. Now as I understand, you do not need to change to new coordinate system to get matric tensor and can be defined without it. If that is true, why is it defined it terms of new and old corinate components?
 
  • #23
Is your question why ##\big\{\frac{\partial}{\partial x^\mu}\big|_p\big\}## is a basis for the tangent space at p? I suggest that you start with the last post I linked to in the post you quoted above.

The metric isn't defined in terms of new and old coordinate systems. It's a tensor field g, so it associates a tensor gp with each point p. For all p and all bases {ei}, the coordinates of gp in the basis {ei} are defined as ##g_p(e_i,e_j)##. Since each coordinate system that covers a region that includes p defines a basis at p, there's a set of components of gp associated with each of those coordinate systems.
 
  • #24
Hymne said:
Hi! I´m trying to get an intuition for these concepts and was just playing at home.
My thought was to start with a 2-Dimensional ON-coordinatesystem, the xy-plane and do the following:

1. Study the vector with the coordinate (1,1) in this system. Now its cov. and con. coordinates is of course in the start the same.

2. Start by imagine that we decrease the angle between the positive part och y and x axis. This means that we get a oblique system and we have a diffrence between cov. and con.

3. What should we see? Well, Take the covariant coordinates x = r cos (v) etc.. and differentiate them with respect to the angle, dv.

4. Do the same thing for the contravariant coordinates (here I tried to do it by expressing them through the elements of the transformation matrix). If the length is invariant and can be expressed by x_i x^i. We should see that the derivatives cancel each other so that:

x_i * (d x^i / dv) = x^i * (d x_i / dv) since (d [x^i x_i] / dv) = 0.

Now to the questions!
Do you see any wrong with my arguments here?
Is there any easier way to express the contravariant coordinates through the cartesian x and y?
Can you show that x_i x^i is invariant when we decrease the angle v in some much easier way?

If you look in "General Relativity" by I.R.Kenyon for example, page 51 - flat 2D space, he illustrates the interpretation of the vector and covector components of an infintesimal vector...so in a limited sense there is such a thing as vector/covector coordinates. This is what you are referring to?
 

1. What is covariance and contravariance?

Covariance and contravariance are concepts in mathematics and computer science that describe how the type of an object changes when it is assigned to a variable or passed as an argument to a function. In covariance, the type of the object can be a subtype of the variable or function's type, while in contravariance, it must be a supertype.

2. How are covariance and contravariance used in programming languages?

Covariance and contravariance are commonly used in programming languages that support polymorphism, such as Java and C#. They allow for more flexible and reusable code by allowing objects of different types to be used interchangeably in certain situations.

3. What is the difference between covariance and contravariance?

The main difference between covariance and contravariance is the direction in which the type relationship is allowed. Covariance allows for subtyping, while contravariance allows for supertyping. In other words, covariance preserves the subtype relationship between types, while contravariance reverses it.

4. How do covariance and contravariance impact code design?

Covariance and contravariance can impact code design by allowing for more flexible and reusable code. By using these concepts, code can be written in a way that can handle different types of objects, making the code more robust and adaptable to changes.

5. What are some common examples of covariance and contravariance in programming?

In programming, covariance and contravariance can be seen in various scenarios, such as function overriding and generic types. In function overriding, covariance allows for a subclass method to return a subtype of the superclass method's return type, while contravariance allows for a subclass method to take a supertype of the superclass method's parameter type. In generic types, covariance and contravariance allow for generic types to be used in a way that is compatible with subtyping relationships.

Similar threads

Replies
16
Views
2K
Replies
1
Views
1K
Replies
11
Views
4K
Replies
2
Views
1K
  • Differential Geometry
Replies
34
Views
2K
  • Differential Geometry
Replies
9
Views
2K
  • Differential Geometry
Replies
1
Views
2K
  • Differential Geometry
Replies
15
Views
4K
  • Advanced Physics Homework Help
Replies
5
Views
2K
  • General Math
Replies
5
Views
1K
Back
Top