I want to apply an affine-linear Transformation $L:\mathbb{R}^2 \rightarrow \mathbb{R}^2: x \rightarrow Lx+b$ on a parabola e.g. $y=x^2$. So I interpret the parabola as a conic and represent it as $\begin{bmatrix}x,y,1\end{bmatrix}M\begin{bmatrix}x,y,1\end{bmatrix}^T $ with $M \in \mathbb{R}^{3x3}$. To apply my transformation I need to expand $L$ to $L_1=\begin{bmatrix}L & 0\\0&-1 \end{bmatrix}$ and get my transformation by $\begin{bmatrix}x-b_1,y-b_2,1\end{bmatrix}L_1^TML_1\begin{bmatrix}x-b_1,y-b_2,1\end{bmatrix}^T$ with $b_1,b_2$ being the elements of $b$. For some rotation matrix $L \in SO(2)$ this works just as intended, however if my Matrix $L$ rotates and strechtes it doesn't. Meaning mapping 3 points that lay on my first parabola should also lay on the mapped parabola. Here is my Matlabcode, which I used for my calculations.
M=[-1,0,0;0,0,1/2;0,1/2,0];
L1=[0,2;-2,0];
b1=[1;1];
Points=[0,0;-1,1;1,1];
Pointsproj=(L1*Points'+b1)';
L=-eye(3);
L(1:2,1:2)=L1;
Mnew=(L)'*(M)*(L);
f=@(x,y)M(1,1)*(x)^2+(M(2,1)+M(1,2))*(x)*(y)+(M(3,1)+M(1,3))*(x)+(M(2,3)+M(3,2))*(y)+M(2,2)*(y)^2+M(3,3);
g=@(x,y)Mnew(1,1)*(x-b1(1))^2+(Mnew(2,1)+Mnew(1,2))*(x-b1(1))*(y+b1(2))+(Mnew(3,1)+Mnew(1,3))*(x-b1(1))+(Mnew(2,3)+Mnew(3,2))*(y-b1(2))+Mnew(2,2)*(y-b1(2))^2+Mnew(3,3);
figure
grid on;
hold on;
fimplicit(f);
plot(Points(:,1),Points(:,2),'+');
plot(Pointsproj(:,1),Pointsproj(:,2),'*');
fimplicit(g);
legend('f','x','Lx+b','g');
Giving me this: Parabola Plot where f is the original parabola and g the mapped one. I think I am missing some factor in my transformed parabola?
(I have erased my first comment : the issue wasn't there).
Here is a modification of your Matlab program which works.
It differs from yours on two main points :
$$L_1=\begin{bmatrix}L & b_1\\0&1 \end{bmatrix} \ \\text{with} \ \ L_1^{-1}=\begin{bmatrix}L^{-1} & -L^{-1}b_1\\0&1 \end{bmatrix}$$
including (it is classical) the translation vector $b_1$ as a third column but in a "backwards" mode (said otherwise : instead of $y=L*x+b_1$, I take $x=L^{-1}*(y-b_1)=L^{-1}*y-L^{-1}*b_1$) (see explanation below the program).
Please note (lines 11 and 12) the compact description of functions $f$ and $g$ taken profit of Matlab's easy matrix handling.
Explanation for the backwards operation :
$$X^TMX=\underbrace{(L_1^{-1}X)^T}_{Y^T}L_1^TML_1\underbrace{(L_1^{-1}X)}_Y=0$$
Edit: Why this form for $L_1$ matrix ? Because $L_1=\begin{bmatrix}L & b_1\\0&1 \end{bmatrix}$ is such that $L_1 \begin{bmatrix}X \\ 1 \end{bmatrix}=\begin{bmatrix}LX+b_1\\1 \end{bmatrix}.$