Transformation of Coordinates

=Translation of Coordinate Axes=

Any point in the 2 dimensional Cartesian plane is usually defined as $$(x,y)$$ meaning that the point is $$x$$ units horizontally from origin $$O = (0,0)$$ and $$y$$ units vertically from origin.

It is always possible, and sometimes desirable, to give the point a new name or definition that reflects its position relative to another point in the 2 dimensional plane, for example $$\Omega,$$ the position of which is defined as $$(h,k)$$ relative to origin $$O.$$

In the diagram point $$P$$ and point $$P'$$ are the same point. It's just that the point has the name or definition $$P$$ when referenced to origin $$O$$ (black arrows), and $$P'$$ when referenced to origin $$\Omega$$ (red arrows).

By inspection:


 * $$h + x' = x$$ or $$x' = x - h$$


 * $$k + y' = y$$ or $$y' = y - k.$$

Actual values:

$$\Omega = (h,k) = (6,4)$$

$$P = (x,y) = (9,10.5)$$

$$P' = (x',y')$$$$ = (x-h,y-k)$$$$ = (9-6, 10.5-4)$$$$ = (3,6.5).$$

Point $$P$$ is defined as $$(9,10.5)$$ relative to origin $$O,$$ and point $$P',$$ the same point, is defined as $$(3,6.5)$$ relative to origin $$\Omega.$$

Linear function
In the diagram  has equation $$2x + 3y - 18 = 0.$$
 * $$2x + 3y - 18 = 0$$ relative to origin $$O.$$
 * $$2x' + 3y' + 6 = 0$$ relative to origin $$\Omega.$$

What is equation of  relative to origin $$\Omega = (6,4)?$$

Using $$x = x' + h,\ y = y' + k:$$

$$2(x' + 6) + 3(y' + 4) - 18 = 0$$

$$2x' + 12 + 3y' + 12 - 18 = 0$$

$$2x' + 3y' + 6 = 0$$

When $$x, y$$ become $$x',y',$$ this means that equation $$2x' + 3y' + 6 = 0$$ is relative to origin $$\Omega.$$ can have equation $$2x + 3y - 18 = 0$$ or equation $$2x' + 3y' + 6 = 0.$$

Equation $$2x' + 3y' + 6 = 0$$ relative to origin $$\Omega$$ is same as equation $$2x + 3y + 6 = 0$$ relative to origin $$O.$$

Note that in both cases:


 * $$X$$ intercept relative to origin is $$-3.$$


 * $$Y$$ intercept relative to origin is $$-2.$$

=Rotation of Coordinate Axes=

If $$X$$ axis, line $$OX$$, is rotated through angle $$\theta$$ so that $$X$$ axis of new system becomes $$OX'$$ then:


 * Counter-clockwise rotation occurs when $$\theta$$ is positive.


 * $$Y$$ axis of new system becomes $$OY'.$$


 * angle between $$OX$$ and $$OX'$$ is $$\theta.$$


 * angle between $$OY$$ and $$OY'$$ is $$\theta.$$

See diagram. By inspection:

Angle $$TPQ = \theta$$

$$QR = ST = x'\sin\theta$$

$$QT = RS = y'\sin\theta$$

$$PQ = y'\cos\theta$$

$$OS = x'\cos\theta = OR + RS = x + y'\sin\theta\ \dots\ (1)$$

$$PR = y = PQ + QR = y'\cos\theta + x'\sin\theta\ \dots\ (2)$$

From $$(1),\ x = x'\cos\theta - y'\sin\theta\ \dots\ (3)$$

From $$(2),\ y = x'\sin\theta + y'\cos\theta\ \dots\ (4)$$

From $$(3)$$ and $$(4):$$

$$x' = x\cos\theta + y\sin\theta\ \dots\ (5)$$

$$y' = y\cos\theta - x\sin\theta\ \dots\ (6)$$

Actual values:

Converting from $$(x,y)$$ to $$(x',y')$$

Process reversed:

Linear function
Let a line have equation: $$ax + by + d = 0.$$
 * $$6x + 17y = 300$$ relative to $$OX,OY$$ (black system).
 * $$3x' + 2y' = 60$$ relative to $$OX',OY'$$ (red system).

Let $$c = \cos\theta;\ s = \sin\theta.$$

After rotation, equation of line relative to $$OX', OY'$$ (red arrows) is:

$$a(x'c - y's) + b(x's + y'c) + d$$ $$= ax'c - ay's + bx's + by'c + d$$ $$= ax'c + bx's + by'c - ay's + d$$ $$= x'ac + x'bs + y'bc - y'as + d$$ $$= x'(ac + bs) + y'(bc - as) + d$$ $$= Ax' + By' + d = 0\ \dots\ (1)$$

where: $$A = a\cos\theta + b\sin\theta;$$$$\ B = b\cos\theta - a\sin\theta.$$

In the diagram  has equation $$6x + 17y - 300 = 0,$$ and $$\cos\theta = \frac{4}{5}.$$

What is equation of  relative to $$OX', OY'$$ (red system)?

Equation of  relative to $$OX', OY':\ 15x' + 10y' - 300 = 0$$ or $$3x' + 2y' = 60.$$

$$OP=OP';\ OQ = OQ'.$$ Triangles $$OPQ,OP'Q'$$ are congruent.

Line1: $$3x' + 2y' = 60$$ has same position in red system as line2: $$3x + 2y = 60$$ in black system.

Quartic function
Let quartic function be defined as $$y = f(x) = \frac{1.5625x^4 - 12.125x^3 - 14.75x^2 + 136.5x + 114}{48}.$$

In diagram, $$X$$ and $$Y$$ axes are rotated through angle $$\theta$$ to produce new system of coordinates $$OX',OY'$$ (red system.)

$$\cos\theta = \frac{4}{5}.$$ What is equation of $$f(x)$$ relative to red system?

$$g(x,y) = ax^4 + bx^3 + cx^2 + dx + e - y$$

After substituting appropriate values for $$a,b,c,d,e,x,y$$ code supplied to application grapher is:

Red curve in diagram has equation $$g(x,y) = 0.$$

Ellipse
Equation of ellipse in diagram is: $$f(x,y) = 55x^2 - 24xy + 48y^2 - 2496 = 0.$$

What is equation of $$f(x,y)$$ relative to minor and major axes (red system)?

The most general equation of second degree in $$x,y$$ has form: $$ax^2 + bxy + cy^2 + dx + ey + f = 0.$$

Rotation of coordinate axes when applied to the general equation produces the primed equation: $$A(x')^2 + Bx'y' + C(y')^2 + Dx' + Ey' + F = 0$$ where:

$$A = an^2 + bns + cs^2$$

$$B = bn^2 - 2ans + 2cns - bs^2$$$$ = bn^2 + (2c - 2a)ns - bs^2$$

$$C = cn^2 - bns + as^2$$

$$D = dn + es$$

$$E = en - ds$$

$$F = f$$

$$n = \cos\theta$$

$$s = \sin\theta$$

Choose values of $$\sin\theta, \cos\theta$$ that make coefficient $$B = 0.$$

From coefficient $$B$$ above:

$$bn^2 + (2c - 2a)ns - bs^2 = 0$$

$$bn^2 - bs^2 = - (2c - 2a)ns$$

Square both sides, substitute $$(1-ss)$$ for $$nn,$$ expand, gather like terms and result is:

$$PS^2+QS+R=0\ \dots\ (1)$$ where:

$$S = \sin^2\theta$$

$$P = 4a^2 + 4b^2 + 4c^2 - 8ac$$

$$Q = -P$$

$$R = b^2$$

See also: Solving ellipse at origin.

From $$(1)$$ above, $$S = 0.36$$ or $$0.64.$$

$$\sin\theta = \sqrt{S} = \pm0.6$$ or $$\pm 0.8.$$

When $$\cos\theta, \sin\theta = 0.6, 0.8,\ f'(x,y) = 39x^2 + 64y^2 - 2496 = 0.$$

When $$\cos\theta, \sin\theta = 0.8, -0.6,\ f'(x,y) = 64x^2 + 39y^2 - 2496 = 0.$$

In this context, $$f'(x,y)$$ is not the derivative of $$f(x,y).$$

Expression $$f'(x,y)$$ means $$f(x,y)$$ relative to primed system $$OX',OY'$$ (red system.)