for a linear transformation :
$$x'=ax+by$$ $$y'=cx+dy$$
is this the direct transformation matrix or the inverse transformation matrix?
$$T = \begin{bmatrix} a&b\\ c&d\\ \end{bmatrix} \tag{1}\label{1}$$
if its direct, I'm having confusion with contravariant components of a vector... a curvilinear transformation can be considered linear in the vicinity of a point and hence (if (1) is true) the direct transformation matrix would be :
$$T = \begin{bmatrix} \frac{\partial {x_1}'}{\partial x_1} &\frac{\partial {x_1}'}{\partial x_2} \\ \frac{\partial {x_2}'}{\partial x_1}&\frac{\partial {x_2}'}{\partial x_2}\\ \end{bmatrix} \tag{2}$$
3Blue1Brown series on linear algebra taught me that $\begin{bmatrix}a \\ c \\ \end{bmatrix}$ in (1) and $\begin{bmatrix}\frac{\partial {x_1}'}{\partial x_1} \\ \frac{\partial {x_2}'}{\partial x_1} \\ \end{bmatrix}$ in (2) represent the covariant basis vectors of new (primed) coordinate system.
So the covariant basis vectors are transforming following the direct matrix and that means the contravariant components of a vector would transform following the inverse transformation matrix:
$$g = \begin{bmatrix} \frac{\partial {x_1}}{\partial {x_1}'} &\frac{\partial {x_1}}{\partial {x_2}'} \\ \frac{\partial {x_2}}{\partial {x_1}'}&\frac{\partial {x_2}}{\partial {x_2}'}\\ \end{bmatrix} \tag{3}$$
Thus, (from (3)), in Index notation, contravariant components of a vector transforms like :
$$A'^{i}= \frac{\partial {x_j}}{\partial x_i}A^{j} $$
this is contrary to the definition of contravariance : $$A'^{i}= \frac{\partial {x_i}'}{\partial x_j}A^{j} $$
please clarify where I'm wrong
Your coordinated transformation can be written as $$\left( \begin{array}{c} x'\\y' \end{array} \right) = \left( \begin{array}{cc} a&b\\c&d \end{array} \right) \left( \begin{array}{c} x\\y \end{array} \right)$$ which has derivatives $$\frac{\partial x'}{\partial x}=a\quad ,\quad \frac{\partial x'}{\partial y}=b, $$ $$\frac{\partial y'}{\partial x}=c\quad ,\quad \frac{\partial y'}{\partial y}=d. $$
If you use the canonical base $e_1=\left(\begin{array}{c}1\\0\end{array}\right)$ and $e_2=\left(\begin{array}{c}0\\1\end{array}\right)$ you will get the components of new base by transforming the old via $$\left( \begin{array}{cc} a&b\\c&d \end{array} \right) \left( \begin{array}{c} 1\\0 \end{array} \right)=\left(\begin{array}{c}a\\c\end{array}\right) \quad ,\quad \left( \begin{array}{cc} a&b\\c&d \end{array} \right) \left( \begin{array}{c} 0\\1 \end{array} \right)=\left(\begin{array}{c}b\\d\end{array}\right).$$ You could write the same as $$e'_1=ae_1+ce_2,$$ $$e'_2=be_1+de_2.$$
Now, solving for $e_1, e_2$ will give $$e_1=\frac{d}{ad-bc}e'_1+\frac{-c}{ad-bc}e'_2,$$ $$e_2=\frac{-d}{ad-bc}e'_1+\frac{a}{ad-bc}e'_2.$$
Observe that this correspond to the inverse coordinated transformation $$\left( \begin{array}{c} x\\y \end{array} \right) = \left( \begin{array}{cc} \frac{d}{ad-bc}&\frac{-b}{ad-bc}\\\frac{-c}{ad-bc}&\frac{a}{ad-bc} \end{array} \right) \left( \begin{array}{c} x'\\y' \end{array} \right),$$ or in other words $$x=\frac{d}{ad-bc}x'+\frac{-b}{ad-bc}y',$$ $$y=\frac{-c}{ad-bc}x'+\frac{a}{ad-bc}y'.$$ So $$ \frac{\partial x}{\partial x'}=\frac{d}{ad-bc}\quad ,\quad \frac{\partial x}{\partial y'}=\frac{-b}{ad-bc} $$ $$ \frac{\partial y}{\partial x'}=\frac{-c}{ad-bc}\quad ,\quad \frac{\partial y}{\partial y'}=\frac{a}{ad-bc} $$
Finally, if you has a vector $A^1e_1+A^2e_2$ written in old coordinates then you will get its new components by subbing the solve above to get \begin{eqnarray*} A^1e_1+A^2e_2 &=&A^1\left(\frac{d}{ad-bc}e'_1+\frac{-c}{ad-bc}e'_2\right)+ A^2\left(\frac{-b}{ad-bc}e'_1+\frac{a}{ad-bc}e'_2\right),\\ &=&\left(A^1\frac{d}{ad-bc}+A^2\frac{-b}{ad-bc}\right)e'_1+ \left(A^1\frac{-c}{ad-bc}+A^2\frac{a}{ad-bc}\right)e'_2. \end{eqnarray*}
These are $$A'^1=A^1\frac{d}{ad-bc}+A^2\frac{-b}{ad-bc}\quad {\rm and}\quad A'^2=A^1\frac{-c}{ad-bc}+A^2\frac{a}{ad-bc}.$$
That in terms of derivatives are $$A'^1=A^1\frac{\partial x}{\partial x'}+A^2\frac{\partial x}{\partial y'}\quad {\rm and}\quad A'^2=A^1\frac{\partial y}{\partial x'}+A^2\frac{\partial y}{\partial y'},$$ which coincide with the law you seek to grasp.