Derivation of the translation matrix of a general 2-variable quadratic function

44 Views Asked by At

Let $Q(x,y)= c_0 + c_1 x + c_2 y + c_3 x^2 + c_4 x y + c_5 y^2$, where $x\in\mathbb{R}$, $y\in\mathbb{R}$ and $c_i\in\mathbb{R}$, $\forall i \in\mathbb{N}, 0 \leq i \leq 5$ denote a general quadratic function of two variables. It is easy to evaluate algebraically, that when $Q(x,y)$ is translated in the $x,y$-plane by $(\Delta x, \Delta y)$ ($\Delta x\in\mathbb{R}$, $\Delta y\in\mathbb{R}$), then the coefficients of the resulting quadratic, denoted $[d_0 \cdots d_5]$ is given by \begin{equation} [d_0 \cdots d_5]^T = \Pi \cdot [c_0 \cdots c_5]^T \end{equation} where \begin{equation*} \Pi = \begin{bmatrix} 1 & \Delta x & \Delta y & {\Delta x}^2 & \Delta x \Delta y & {\Delta y}^2\\ 0 & 1 & 0 & 2\Delta x & \Delta y & 0\\ 0 & 0 & 1 & 0 & \Delta x & 2\Delta y\\ 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 1\\ \end{bmatrix} \end{equation*}

Is there a way of deriving the matrix $\Pi$ by relying on matrix/linear algebra only and not by expanding $Q(x+\Delta x, y +\Delta y)$ with brute force algebra and "guessing" the entries in $\Pi$?

Thanks

1

There are 1 best solutions below

2
On

Let $A$ be symmetric

$$Q(z)=z^TAz + b^Tz+c$$

\begin{align}Q(z+\delta) &= z^TAz + 2z^TA\delta + \delta ^TA\delta + b^T\delta + b^Tz + c \\ &=z^TAz + (2\delta^TA + b^T) z + (c+b^T\delta + \delta^TA\delta) \end{align}

The quadratic terms are not affected, the coefficients corresponding to the quadratic coefficient would be the identity matrix. What has been changed are the linear terms and the constant term.

Since our $b=[c_1, c_2]$ and $A = \begin{bmatrix} c_3 & \frac{c_4}2 \\ \frac{c_4}2 & c_5\end{bmatrix}.$

\begin{align}d_0 = c_0 + \begin{bmatrix} \Delta x & \Delta y\end{bmatrix} \begin{bmatrix} c_1 \\ c_2\end{bmatrix} + \begin{bmatrix} \Delta x & \Delta y\end{bmatrix} \begin{bmatrix} c_3 & \frac{c_4}2 \\ \frac{c_4}2 & c_5\end{bmatrix}\begin{bmatrix} \Delta x \\\Delta y\end{bmatrix} \end{align}

Hence $$d_0=c_0 + c_1\Delta x+ c_2 \Delta y+ c_3 \Delta x^2+c_4 \Delta x \Delta y + c_5 \Delta y^2$$ Also $$\begin{bmatrix}d_1 \\ d_2 \end{bmatrix}=\begin{bmatrix} c_1 \\ c_2 \end{bmatrix}+2 \begin{bmatrix} c_3 & \frac{c_4}2 \\ \frac{c_4}2 & c_5\end{bmatrix}\begin{bmatrix} \Delta x \\ \Delta y \end{bmatrix}$$


In general, if you have to work with more than two variables,

$$d_0=c_0 + \sum_x c_x\Delta_x + \sum_{x,y}c_{x,y }\Delta_{x} \Delta_y $$ and for $x>0$, $$d_x = c_x + 2c_{x,x}\Delta_x + \sum_{y \ne x} c_{x,y} \Delta_y$$

$$d_{xy}=c_{xy}$$