Category Archives: Matrices

Eigenvalues and Eigenvectors

My Year 11 Specialist students have had an investigation which involves finding eigenvalues, eigenvectors and lines that are invariant under a particular linear transformation. This is not part of the course, but I feel for teachers who have to create new investigations every year.

Let’s find the eigenvalues and eigenvectors for matrix T=\begin{bmatrix}-\frac{1}{2}&-\frac{\sqrt{3}}{2}\\-\frac{\sqrt{3}}{2}&\frac{1}{2}\end{bmatrix}

We want to find \lambda such that

(1)   \begin{equation*}T\textbf{v}=\lambda \textbf{v}\end{equation*}

We solve det(T-\lambda I)=0

    \begin{equation*}T-\lambda I=\begin{bmatrix}-\frac{1}{2}-\lambda&-\frac{\sqrt{3}}{2}\\-\frac{\sqrt{3}}{2}&\frac{1}{2}-\lambda\end{bmatrix}\end{equation}

det\left (T-\lambda I \right )=\left (-\frac{1}{2}-\lambda \right ) \left ( \frac{1}{2}-\lambda \right )- \left (-\frac{\sqrt{3}}{2} \right ) \left ( -\frac{\sqrt{3}}{2} \right )

Hence 0=\lambda^2-1 and \lambda=\pm 1

When \lambda=1, \begin{bmatrix}-\frac{1}{2}&-\frac{\sqrt{3}}{2}\\-\frac{\sqrt{3}}{2}&\frac{1}{2}\end{bmatrix}\begin{bmatrix}x_1\\x_2\end{bmatrix}=\begin{bmatrix}x_1\\x_2\end{bmatrix}

Hence, -\frac{x_1}{2}-\frac{\sqrt{3}x_2}{2}=x_1

x_2=-\frac{3x_1}{\sqrt{3}} and the eigenvector is \begin{bmatrix}1\\-\sqrt{3}\end{bmatrix}

When \lambda=-1, \begin{bmatrix}-\frac{1}{2}&-\frac{\sqrt{3}}{2}\\-\frac{\sqrt{3}}{2}&\frac{1}{2}\end{bmatrix}\begin{bmatrix}x_1\\x_2\end{bmatrix}=\begin{bmatrix}-x_1\\-x_2\end{bmatrix}

Hence, -\frac{x_1}{2}-\frac{\sqrt{3}x_2}{2}=-x_1

x_2=\frac{x_1}{\sqrt{3}} and the eigenvector is \begin{bmatrix}1\\\frac{1}{\sqrt{3}}\end{bmatrix}

Which means the invariant lines are y=-\sqrt{3}x and y=\frac{x}{\sqrt{3}}

A quadrilateral with vertices on our lines
The vertices after they have been transformed – A and C remain in the same place (they are on the \lambda=1 line)
The quadrilateral (purple) after the transformation

Leave a Comment

Filed under Co-ordinate Geometry, Eigenvalues, Matrices, Transformations, Vectors, Year 11 Specialist Mathematics

Linear Transformation (Rotation) Question

The unit square is rotated about the origin by 45^\circ anti-clockwise.
(a) Find the matrix of this transformation.
(b) Draw the unit square and its image on the same set of axes.
(c) Find the area of the over lapping region.

Remember the general rotation matrix is

    \begin{equation*}\begin{bmatrix}cos(\theta)&-sin(\theta)\\sin(\theta)&cos(\theta)\end{bmatrix}\end{equation}

Hence

    \begin{equation*}\begin{bmatrix}cos(45)&-sin(45)\\sin(45)&cos(45)\end{bmatrix}=\begin{bmatrix}\frac{1}{\sqrt{2}}&-\frac{1}{\sqrt{2}}\\\frac{1}{\sqrt{2}}&\frac{1}{\sqrt{2}}\end{bmatrix}\end{equation}

The unit square has co-ordinates

\begin{bmatrix}0 & 1 & 1& 0\\0&0&1&1\end{bmatrix}

Unit Square

Transform the unit square

\begin{bmatrix}\frac{1}{\sqrt{2}}&-\frac{1}{\sqrt{2}}\\ \frac{1}{\sqrt{2}}&\frac{1}{\sqrt{2}}\end{bmatrix}\begin{bmatrix}0 & 1 & 1& 0\\0&0&1&1\end{bmatrix}=\begin{bmatrix}0&\frac{1}{\sqrt{2}}&0&-\frac{1}{\sqrt{2}}\\0&\frac{1}{\sqrt{2}}&\frac{2}{\sqrt{2}}&\frac{1}{\sqrt{2}}\end{bmatrix}

Unit Square and Transformed Unit Square

The overlapping area is the area of \Delta ADC– the area of \Delta EFC

We know \angle{FCE}=45^\circ because the diagonal of a square bisects the angle.

We know\angle{EFC} is a right angle as it’s on a straight line with the vertex of a square.

Hence \Delta EFC is isosceles.

\overline{AC}=\sqrt{1^2+1^2}=\sqrt{2} and \overline{AF}=1, hence \overline{FC}=\sqrt{2}-1

A_{\Delta ADC}=\frac{1}{2}(1)(1)=\frac{1}{2}

A_{\Delta ECF}=\frac{1}{2}(\sqrt{2}-1)(\sqrt{2}-1)

Area of shaded region =\frac{1}{2}-\frac{1}{2}(3-2\sqrt{2})=\sqrt{2}-1

Leave a Comment

Filed under Area, Co-ordinate Geometry, Finding an area, Geometry, Matrices, Transformations, Year 11 Specialist Mathematics

Matrices -Linear Transformations (Rotation)

We are going to find a matrix to rotate a point about the origin a number of degrees (or radians).

We want to find P'(c, d)

P and P' are equidistant from the origin. I.e. \sqrt{c^2+d^2}=\sqrt{a^2+b^2}

Remember, anti-clockwise angles are positive.

    \begin{equation*}cos(\theta+\alpha)=\frac{c}{\sqrt{c^2+d^2}}\end{equation}

    \begin{equation*}c=\sqrt{a^2+b^2}cos(\theta+\alpha)\end{equation}

Use the cosine addition identity.

    \begin{equation*}c=\sqrt{a^2+b^2}(cos(\theta)cos(\alpha)-sin(\theta)sin(\alpha))\end{equation}

    \begin{equation*}c=\sqrt{a^2+b^2}(cos(\theta)\frac{a}{\sqrt{a^2+b^2}}-sin(\theta)\frac{b}{\sqrt{a^2+b^2}})\end{equation}

(1)   \begin{equation*}c=acos(\theta)-bsin(\theta)\end{equation*}

We will do the same for d

    \begin{equation*}sin(\theta+\alpha)=\frac{d}{\sqrt{a^2+b^2}}\end{equation}

    \begin{equation*}d=\sqrt{a^2+b^2}sin(\theta+\alpha)\end{equation}

Use the sine addition identity.

    \begin{equation*}d=\sqrt{a^2+b^2}(sin(\theta)cos(\alpha)+cos(\theta)sin(\alpha)\end{equation}

    \begin{equation*}d=\sqrt{a^2+b^2}(sin(\theta)\frac{a}{\sqrt{a^2+b^2}}+cos(\theta)\frac{b}{\sqrt{a^2+b^2}})\end{equation}

(2)   \begin{equation*}d=asin(\theta)+bcos(\theta)\end{equation*}

Let R be the rotation matrix, then

    \begin{equation*}R\begin{bmatrix}a\\b\end{bmatrix}=\begin{bmatrix}acos(\theta)-bsin(\theta)\\asin(\theta)+bcos(\theta)\end{bmatrix}\end{equation}

Hence R must be

(3)   \begin{equation*}R=\begin{bmatrix}cos(\theta)&-sin(\theta)\\sin(\theta)&cos(\theta)\end{bmatrix}\end{equation*}

Example

Find the image of the line y=x+1 after it is rotated 60^\circ about the origin.

I am going to select two points on the line and transform them.

    \begin{equation*}\begin{bmatrix}cos(60)&-sin(60)\\sin(60)&cos(60)\end{bmatrix}\begin{bmatrix}0&4\\1&5\end{bmatrix}=\begin{bmatrix}x'_1&x'_2\\y'_1&y'_2\end{bmatrix}\end{equation}

    \begin{equation*}\begin{bmatrix}\frac{1}{2}&-\frac{\sqrt{3}}{2}\\\frac{\sqrt{3}}{2}&\frac{1}{2}\end{bmatrix}\begin{bmatrix}0&4\\1&5\end{bmatrix}=\begin{bmatrix}x'_1&x'_2\\y'_1&y'_2\end{bmatrix}\end{equation}

    \begin{equation*}\begin{bmatrix}-\frac{\sqrt{3}}{2}&\frac{4-5\sqrt{3}}{2}\\\frac{1}{2}&2\sqrt{3}+\frac{5}{2}\end{bmatrix}=\begin{bmatrix}x'_1&x'_2 \\y'_1&y'_2\end{bmatrix}\end{equation}

We can then find the equation of the line.

    \begin{equation*}m=\frac{2\sqrt{3}+\frac{5}{2}-\frac{1}{2}}{\frac{4-5\sqrt{3}+\sqrt{3}}{2}}\end{equation}

    \begin{equation*}m=-2-\sqrt{3}\end{equation}

    \begin{equation*}y-\frac{1}{2}=(-2-\sqrt{3})(x+\frac{\sqrt{3}}{2})\end{equation}

    \begin{equation*}y=(-2-\sqrt{3})x-1-\sqrt{3}\end{equation}

Leave a Comment

Filed under Addition and Subtraction Identities, Identities, Matrices, Transformations, Trigonometry, Year 11 Specialist Mathematics

Matrices – Linear Transformations (reflection in y=mx)

We are going to derive the transformation matrix for a reflection across a line y=mx.

Reflecting P across the line to P'

Things to remember about a reflection:

  • The distance between P' and the line is same as the distance between P and the line. Hence M is the midpoint of P and P'.
  • The line segment joining P and P' is perpendicular to the line.

Our aim is to find a general identity for P' and then use that to derive a transformation matrix.

Let’s start by finding the equation of the line joining P and P'.

We know the gradient of this line is perpendicular to the gradient of y=mx, hence the gradient is -\frac{1}{m}.

    \begin{equation*}y-y_0=-\frac{1}{m}(x-x_0)\end{equation}

And (a,b) is a point on the line.

    \begin{equation*}y-b=-\frac{1}{m}(x-a)\end{equation}

Which simplifies to

(1)   \begin{equation*}y=-\frac{1}{m}x+\frac{a+bm}{m}\end{equation*}

We are going to find the co-ordinates of M in two ways; as the midpoint of P and P', and as the point of intersection of y=mx and y=-\frac{1}{m}x+\frac{a+bm}{m}

As the midpoint of P and P'

(2)   \begin{equation*}M=(\frac{a+c}{2}, \frac{b+d}{2})\end{equation*}

As the point of intersection of y=mx and y=-\frac{1}{m}x+\frac{a+bm}{m}

    \begin{equation*}mx=-\frac{1}{m}x+\frac{a+bm}{m}\end{equation}

    \begin{equation*}mx+\frac{x}{m}=\frac{a+bm}{m}\end{equation}

    \begin{equation*}\frac{m^2x+x}{m}=\frac{a+bm}{m}\end{equation}

    \begin{equation*}x(m^2+1)=a+bm\end{equation}

    \begin{equation*}x=\frac{a+bm}{m^2+1}\end{equation}

Substitute x into y=mx

    \begin{equation*}y=\frac{am+bm^2}{m^2+1}\end{equation}

(3)   \begin{equation*}M=(\frac{a+bm}{m^2+1},\frac{am+bm^2}{m^2+1})\end{equation*}

M must equal M, hence we can find (c, d) in terms of (a, b)

Equate equation 2 and 3

    \begin{equation*}\frac{a+c}{2}=\frac{a+bm}{m^2+1}\end{equation}

    \begin{equation*}a+c=2(\frac{a+bm}{m^2+1})\end{equation}

    \begin{equation*}c=2(\frac{a+bm}{m^2+1})-a\end{equation}

    \begin{equation*}c=\frac{2a+2bm-am^2-a}{m^2+1}\end{equation}

    \begin{equation*}c=\frac{a+2bm-am^2}{m^2+1}\end{equation}

(4)   \begin{equation*}c=\frac{1-m^2}{m^2+1}a+\frac{2m}{m^2+1}b\end{equation*}

And

    \begin{equation*}\frac{b+d}{2}=\frac{am+bm^2}{m^2+1}\end{equation}

    \begin{equation*}b+d=2(\frac{am+bm^2}{m^2+1})\end{equation}

    \begin{equation*}d=2(\frac{am+bm^2}{m^2+1})-b\end{equation}

    \begin{equation*}d=\frac{2am+2bm^2-bm^2-b}{m^2+1}\end{equation}

    \begin{equation*}d=\frac{2m}{m^2+1}a+\frac{m^2-1}{m^2+1}b\end{equation}

    \begin{equation*}d=\frac{2m}{m^2+1}a-\frac{-m^2+1}{m^2+1}b\end{equation}

(5)   \begin{equation*}d=\frac{2m}{m^2+1}a-\frac{1-m^2}{m^2+1}b\end{equation*}

Hence P'=(\frac{1-m^2}{m^2+1}a+\frac{2m}{m^2+1}b, \frac{2m}{m^2+1}a-\frac{1-m^2}{m^2+1}b)

For ease of writing, let p=\frac{1-m^2}{m^2+1} and q=\frac{2m}{m^2+1}

Then

P'=(pa+qb, qa-px), which we can generalise to (px+qy, qx-py)

Now let’s think about a transformation matrix, we want to transform (x, y) to (px+qy, qx-py)

    \begin{equation*}\begin{bmatrix}p&q\\q &-p\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix}=\begin{bmatrix}px+qy\\qx-py\end{bmatrix}\end{equation}

Remember the gradient of a line is the tangent of the angle of inclination, tan(\theta)=m

    \begin{equation*}p=\frac{1-m^2}{m^2+1}=\frac{1-tan^2(\theta)}{tan^2(\theta)+1}\end{equation}

Remember the identity

    \begin{equation*}tan^2(\theta)+1=sec^2(\theta)\end{equation}

    \begin{equation*}p=\frac{1-(sec^2(\theta)-1)}{sec^2(\theta)}\end{equation}

    \begin{equation*}p=\frac{2-sec^2(\theta)}{sec^2(\theta)}\end{equation}

    \begin{equation*}p=\frac{2}{sec^2(\theta)}-\frac{sec^2(\theta)}{sec^2(\theta)}\end{equation}

    \begin{equation*}p=2cos^2(\theta)-1\end{equation}

(6)   \begin{equation*}p=cos(2\theta)\end{equation*}

And we will do the same for q.

    \begin{equation*}q=\frac{2m}{m^2+1}=\frac{2tan(\theta)}{tan^2(\theta)+1}\end{equation}

    \begin{equation*}q=\frac{\frac{2sin(\theta)}{cos(\theta)}}{sec^2(\theta)}\end{equation}

    \begin{equation*}q=\frac{2sin(\theta)}{cos(\theta)} \times cos^2(\theta)\end{equation}

    \begin{equation*}q=2sin(\theta)cos(\theta)\end{equation}

(7)   \begin{equation*}q=sin(2\theta)\end{equation*}

Hence our transformation matrix is

(8)   \begin{equation*}\begin{bmatrix}cos(2\theta)&sin(2\theta)\\sin(2\theta)&-cos(2\theta)\end{bmatrix}\end{equation*}

Example

The vertices of a triangle T are A(-3, 1), B(6, -4) and C(1, 5). T' is a reflection of T in the line y-x=0

The gradient of the line y=x is 1.

    \begin{equation*}tan(\theta)=1\end{equation}

    \begin{equation*}\theta=\frac{\pi}{4}\end{equation}

Our transformation matrix is

    \begin{equation*}\begin{bmatrix}cos(\frac{\pi}{2})&sin\frac{\pi}{2})\\sin\frac{\pi}{2})&-cos(\frac{\pi}{2})\end{bmatrix}\end{equation}

Which is

    \begin{equation*}\begin{bmatrix}0&1\\1&0\end{bmatrix}\end{equation}

So

    \begin{equation*}T'=\begin{bmatrix}0&1\\1&0\end{bmatrix}\begin{bmatrix}-3&6&1\\1&-4&5\end{bmatrix}\end{equation}

    \begin{equation*}T'=\begin{bmatrix}1&-4&5\\-3&6&1\end{bmatrix}\end{equation}

Leave a Comment

Filed under Matrices, Transformations