Covariant and contravariant for a beginner I saw that people were representing matrices in two ways.

*

*$$\sum_{j=1}^n a_{ij}$$
It is representing a column matrix (vector actually) if we assume $i=1$.
$$\begin{bmatrix}a_{11} & a_{12} & a_{13} & ......\end{bmatrix}$$


*$$\sum_{j=1}^n a^{ij}$$
What is it representing? At first, I thought it was a row matrix (vector) since it is the opposite of a column matrix (vector). But when I was writing the question I couldn't generate a row matrix using the 2nd equation. I became more confused when I saw $a_j^{i}$, and sometimes there are two variables in sub and sup: $a_{ji}^{kl}$. I don't remember if either of them matches (I am not sure if I wrote it the wrong way).
After searching a little bit I found that when we move components our vectors don't change. But, I can't get deeper into covariant and contravariant. I even saw some people use an equation like this: $^ia_j$.
I was reading Covariant vs contravariant vectors, and those answers don't explain the covariant and contravariant for a beginner (those explanations are for those who have some knowledge of the covariant and contravariant).
I was watching the video, what he said that is, if we take some basis vectors and then find a vector using those basis vectors than if we decrease length of those vectors than that's contravariant vectors (I think he meant to say changing those components). But the explanation is not much more good to me. He might be correct also but I don't have any idea. If he is assuming that changes of basis vectors is contravariant then is "the original" basis vectors covariant? So how do we deal with covariant and contravariant altogether $g^i_j$ sometimes $g_j^i$
 A: Take a map and then place some tracing paper over it and draw axes on it. Now, if you rotate the axes clockwise, from the frame of the axes it looks as though the map underneath is rotating counter-clockwise.
This is contravariance. When you act in a certain way, something else acts counter to that.
Here's another way to think about it that is more general. Take two arrows and lay them end to end like this:
----f---> ---g-->
Now here g follows f. Now turn the arrows the other way around, so we have
<---f--- <---g----
Now we have f following g!
This seems actually too simple to bother with. But the simplicity and naiveity of this example hides a deeper truth. Formalising this gives the notion of contravariant functors in category theory and is one notion of duality there. We also have the notion of covariant functors.
Whilst physicists talk about covariant and contravariant vectors, this is an abuse of language. Vectors, formally speaking, can't be covariant or contravariant because they don't change. It turns out that transforming the components of a vector on a change of basis actually yields a natural contravariant functor whilst doing the same for covectors gives a covariant functor. This is why we say vectors are contravariant and covectors are covariant.
A: In general sense, convariant and contravariant isn't a interesting thing. But what confuses here that is the meaning of those words.
Actually, if we think of two different basic vectors than a basis vector will be covariant another will be contravariant. But a basis vector must be smaller than another basis vector. Let we have a vector which looks like this : $\vec{A}=2\vec{e_1}+2\vec{e_2}$. Here $\vec{e_1}$ and $\vec{e_2}$ is basis vectors. I am taking two e_1 and e_2 to make a vector line. Now I am going to decrease length of those basis vectors let $\tilde{\vec{e_1}}=\frac{1}{2}\vec{e_1}$ and $\tilde{\vec{e_2}}=\frac{1}{2}\vec{e_2}$. To make that $\vec{A}$ using these new basis vectors I must increase coefficient of $\vec{e_1}$ and $\vec{e_2}$. Systematically, that vector should be $\vec{A}=4\tilde{\vec{e_1}}+4\tilde{\vec{e_2}}$. So that I can find the same vector this way. But here we can write $\tilde{\vec{e_1}}=e^1$ (It's superscript not exponent). And $e_1$ is called covariant and $e^1$ is called contravariant.
We usually use the method to define spacetime from different parts. There's possible way to transform (It's not the one which I had seen but it describes little bit) them also.
When using contravariant and covariant in a single term that represent that, we are trying to represent a vector using different basis. Like as, we are going to define plain line respectively through x,y and z axis $e_1$, $e_2$ and $e_3$. Now I am going to transform them rather than decreasing their length and I am call those transformed basis vector as $e^1$, $e^2$ and $e^3$. To find a curvy vector we must use those transformed and normal basis vectors together (we can call that vector by normal basis vectors but it will be easier to find that vector by mixing all basis vectors) $\vec{A}=g^1_2+g^3_1$. For finding any kind of vector we use i,j,k respectively for 3 dimensional coordinate. We can take another vector $\vec{B}=\sum_{ijk} g_i^{jk}+g_k^{ij}$. But Einstein said that we are summing them every time so we can remove the summation expression from that equation but that doesn't mean we aren't summing we are summing by default. So the same vector will look like, $\vec{B}=g_i^{jk}+g_k^{ij}$.
A: It's as simple as this:
I can always write a vector in two ways using Einstein notation:
$$\mathbf{A} = A^i \mathbf{e}_i = A_i \mathbf{e}^i$$
and interpret $\mathbf{A}$ as coordinate invariant in the sense that it is invariant under transformations of the basis or coordinates respectively so long as I transform the coordinates or basis respectively by the inverse transformation.
The convention is to place the index down when we perform a direct transformation on that quantity, and to transform the quantity with upper indices by the inverse transformation, which is why it is completely consistent to write it in two separate ways.
As we'll see below, this approach is actually more primitive than the approach the answers in the other question take, because all it invokes are the simple ideas of a linear combination and basis which trace back to the axioms of a vector space without imposing additional structure.
When we perform a direct transformation on the basis, we write the vector $\mathbf{A}$ as $\mathbf{A} = A^i \mathbf{e}_i$ and say $\mathbf{e}_i$ transforms under an invertible matrix $M^i_{\ \ \ j}$, interpreted as a basis transformation, as
$$\mathbf{e}_i \to \mathbf{e}_i' = M^j_{ \ \ \ i} \mathbf{e}_j.$$
In order for $\mathbf{A}$ to remain invariant, this means that $A^i$ must transform under the inverse $(M^{-1})^i_{\, j}$ via
$$A^i \to A'^i = (M^{-1})^i_{\,j} A^j$$
so that $\mathbf{A}$ is invariant:
$$\mathbf{A} = A'^i \mathbf{e}_i' = (M^{-1})^i_{\ j} A^j M^k_{ \ \ \ i} \mathbf{e}_k =  A^i \mathbf{e}_i $$
Since the direct transformation $M^i_{ \ \ \ j}$ is applied to the basis vectors ($\mathbf{e}_i$), we say the basis is a covariant basis and denote it by $\mathbf{e}_i$, i.e. the basis co-varies with the direct transformation. Since $A^i$ transforms under the inverse matrix of the matrix we applied directly to the basis, we say the $A^i$ are contravariant components, where "contra" means "against" as in the components "vary against" the transformation that we applied directly to the basis.
Notice the quantity we apply the direct transformation to (in this case, the basis) has it's indices down.
When we perform a direct transformation on the components, we write the vector $\mathbf{A}$ as $\mathbf{A} = A_i \mathbf{e}^i$ and say $A_i$ transforms under an invertible matrix $M^i_{\ \ \ j}$ as
$$A_i \to A_i' = M^j_{ \ \ \ i} A_j.$$
In order for $\mathbf{A}$ to remain invariant, this means that the basis $\mathbf{e}^i$ must transform under the inverse $(M^{-1})^i_{\, j}$ via
$$\mathbf{e}^i \to \mathbf{e}'^i = (M^{-1})^i_{\,j} \mathbf{e}^j.$$
We now have
$$\mathbf{A} = A_i' \mathbf{e}'^i = M^j_{\ \ \ i} A_j (M^{-1})^i_{ \ \ \ k} \mathbf{e}^k =  A_i \mathbf{e}^i $$
Since the direct transformation $M^i_{ \ \ \ j}$ is now applied to the components, we say the componenta ($A_i$) are the covariant components of $\mathbf{A}$, i.e. the components co-vary with the transformation. Since the basis vectors ($\mathbf{e}^i$) transform under the inverse matrix of the matrix we applied directly to the components, we say the basis is a contravariant basis, where "contra" means "against" as in the basis "varies against" the direct transformation that we applied directly to the components.
Notice the quantity we apply the direct transformation to (in this case, the basis) has it's indices down.
Although I have used the language of linear transformations, and used matrices $M$ to do this, this is in fact just a convenience. Really I have used nothing more than the concept of a linear combination and the notion of a basis which are as close to the axioms of a vector space as one can get with this approach. I have not actually used linear transformations, dual spaces, musical isomorphisms, or anything the other answers claim one needs to use, linear map language was just a convenience. Technically I have not applied anything to the vector $\mathbf{A}$, no linear maps, no inner products, nothing... This approach is simply more primitive and uses less structure, it's a complete distraction to start invoking such concepts on a primitive level.
All I have actually done is taken a vector $\mathbf{A} = A'^i \mathbf{e}_i'$ and written the basis vectors $\mathbf{e}_i'$ as linear combinations of some new basis vectors $\mathbf{e}_i$, and summarized the result as $\mathbf{e}_i' = M^j_{\ \ \ i} \mathbf{e}_j$ which the same notation used when working with matrices for convenience. I then expanded this out and re-labelled the coefficients as in
$$\mathbf{A} = A'^i \mathbf{e}_i' = A'^i M^j_{\ \ \ i} \mathbf{e}_j = A^j \mathbf{e}_j $$
I followed the convention that the indices on the object I am 'transforming' are placed down, and for convenience refer to the quantity I am 'directly applying' $M$ to (in this case the basis) as the covariant objects, noting the coefficients must then transform 'contravariantly' i.e. against the direct transformation. You can see this from the last expression again since $A'^i M^j_{\ \ \ i} = A^j$ implies $A'^i = (M^{-1})^i_{ \ \ \ j} A^j$.
I could instead have interpreted the coefficients as the result of a direct matrix $M$ acting on them (i.e. they came from having applied the inverse of $M$ to the original basis), so I'd write $\mathbf{A} = A_i' \mathbf{e}'^i$ and repeat a similar argument.
Obviously it's natural to enquire about the relationship between $A^i$ and $A_i$, and then you can bringing in extra structure of metric tensors etc...
This is why vectors are so useful, they provide a coordinate independent way to talk about certain physical quantities like electric fields that we can still analyze explicitly in useful coordinate systems.
