Home
Course Guidelines
About the course Prerequite Material References
Python
Jupyter Notebooks Python overview
Exercises
Before the semester start: Installation and exercise setup Week 1: Introduction to Python and libraries Week 2: Vector representations Week 3: Linear Algebra Week 4: Linear Transformations Week 5: Models and least squares Week 6: Assignment 1 - Gaze Estimation Week 7: Model selection and descriptive statistics Week 8: Filtering Week 9: Classification Week 10: Evaluation Week 11: Dimensionality reduction Week 12: Clustering and refresh on gradients Week 13: Neural Networks Week 14: Convolutional Neural Networks (CNN's)
Tutorials
Week 1: Data analysis, manipulation and plotting Week 2: Linear algebra Week 3: Transformations tutorial Week 4: Projection and Least Squares tutorial Week 7: Cross-validation and descriptive statistics tutorial Week 8: Filtering tutorial Week 11: Gradient Descent / Ascent
In-class Exercises
In-class 1 In-class 2 In-class 10 In-class 3 In-class 4 In-class 8
Explorer

Document

  • Overview
  • 2. Non-linear decision boundaries
  • 3. Evaluating Classifiers
  • 4. Bases and Transformations
  • 5. HoG Classifier

Content

  • Task 1 Identifying Basis Vectors
  • Task 2 Basis Transformation and Change of Coordinates
  • Task 3 Applying a Linear Transformation in Different Bases
  • Task 4 Basis and Dimensionality Check

Bases and transformations

The following tasks are designed to provide a refresher on bases and transformations between them.

List of individual tasks
  • Task 1: Identifying Basis Vectors
  • Task 2: Basis Transformation and Change of Coord…
  • Task 3: Applying a Linear Transformation in Diff…
  • Task 4: Basis and Dimensionality Check
Task 1: Identifying Basis Vectors

Given the following bases vectors for $\mathbb{R}^2$:

$$ \begin{array}{l} 1. \left\{ \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix} \right\} \\[12pt] 2. \left\{ \begin{bmatrix} 2 \\ 3 \end{bmatrix}, \begin{bmatrix} -1 \\ 2 \end{bmatrix} \right\} \\[12pt] 3. \left\{ \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 2 \\ 2 \end{bmatrix} \right\} \\ \end{array} $$
  1. Which of these sets forms a basis for $\mathbb{R}^2 $? Justify your answer by checking linear independence and spanning the vector space.
# Write solutions here
# Write solutions here
Task 2: Basis Transformation and Change of Coordinates

Consider three bases in $\mathbb{R}^2$:

  1. The standard basis $$ E = \left\{ \begin{bmatrix} 1 \\ 0 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \end{bmatrix} \right\} $$
  2. The basis $$ B = \left\{ \begin{bmatrix} 1 \\ 2 \end{bmatrix}, \begin{bmatrix} 2 \\ -1 \end{bmatrix} \right\} $$
  3. The basis $$ C = \left\{ \begin{bmatrix} 2 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ 3 \end{bmatrix} \right\} $$

Given two vectors in the standard basis:

$$ \text{v} = \begin{bmatrix} 3 \\ 1 \end{bmatrix}, \text{w} = \begin{bmatrix} 7 \\ 6 \end{bmatrix} $$
  1. Draw the basis vectors for $E$, $B$ , and $C$ and the vectors $\text{v}$ and $\text{w}$ on a piece of paper.

  2. Express $\text{v}$ and $\text{w}$ in the basis $B$.

  3. Express $\text{v}$ and $\text{w}$ in the basis $C$.

  4. Find the change of basis matrix $T_E^B$ that given a vector expressed in the basis E maps it to the basis B.

  5. Find the change of basis matrix $T_E^C$ that given a vector expressed in the basis E maps it to the basis C.

  6. Use the change of basis matrices to transform $\text{v}$ and $\text{w}$ from standard basis to the basis $B$ and $C$ respectively. Verify that the resulting coordinates match your results from the previous steps.

# Write solutions here
# Write solutions here
Task 3: Applying a Linear Transformation in Different Bases

Let $ T: \mathbb{R}^2 \to \mathbb{R}^2 $ be a linear transformation represented by the matrix: $$ A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} $$ in the standard basis. Let $$ B = \left\{ \begin{bmatrix} 1 \\ 1 \end{bmatrix}, \begin{bmatrix} -1 \\ 2 \end{bmatrix} \right\} $$ be a new basis.

  1. Calculate the matrix that represents $ T $ with respect to the basis $ B $. Use the change of basis matrices to show your work.
# Write solutions here
# Write solutions here
Task 4: Basis and Dimensionality Check

Suppose $ \mathbb{R}^3 $ has a basis given by $$ B = \left\{ \begin{bmatrix} 1 \\ 0 \\ 1 \end{bmatrix}, \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}, \begin{bmatrix} 1 \\ -1 \\ 0 \end{bmatrix} \right\}. $$

  1. Verify that $ B $ is a basis by showing it spans $ \mathbb{R}^3 $ and is linearly independent.
  2. If a fourth vector $ \begin{bmatrix} 2 \\ -1 \\ 3 \end{bmatrix} $ is added to $ B $, does it still form a basis for $ \mathbb{R}^3 $? Explain your reasoning in terms of dimension.
# Write solutions here
# Write solutions here