# Calculating tangent vector of curve s(P,$\alpha$) at given point $\alpha$ = 0

I am reading the paper "Transformation Invariance in Pattern Recognition – Tangent Distance and Tangent Propagation", where the tangent vector is calculated for the given curve $$s(P,\alpha)$$ at $$\alpha=0$$ by differentiating with respect to $$\alpha$$, that is, $$\frac{\partial s(P,\alpha)}{\partial\alpha}$$. For the curve, I have taken one $$2D$$ image and I am rotating it with matrix $$R=\left[\matrix{cos(\alpha)\space -sin(\alpha)\\sin(\alpha) \space\space\space\space\space cos(\alpha)} \right]$$.

As my image is fixed, the curve is just a function of $$\alpha$$. Therefore, to find the tangent vector, what I am doing is as follows:

1. I am rotating the image by the matrix $$R^{'}$$ which is $$R^{'}=\left[\matrix{-sin(\alpha)\space -cos(\alpha)\\cos(\alpha) \space\space\space\space\space -sin(\alpha)} \right]$$

2. This rotates the image by $$90$$ degree, which is not the expected result.

I have done the same exercise by differentiating numerically and I am getting the expected answer which is as follows: $\alpha$=0"> $\alpha$=0">

Please, help me to understand my mistake in taking derivative of the matrix and multiplying it with image.

• What does the rotation have to do with the differentiation of the curve function?
– nbro
Feb 27 '19 at 14:31
• You can see 2D image as a point in 16 X 16 dimensional space. So if you keep rotating you get a curve in 256 dimensional space wrt rotation angle. So I want to differentiate this curve wrt to rotational angle. Feb 28 '19 at 3:55