Skip to content
UoL CS Notes

Vectors, Matrices & Graphical Effects

COMP116 Tutorials

Vectors

Movement

3D vectors are ordered like so:

\[\langle x,y,z\rangle\]

With $z$ being the vertical component.

In 4D a 4$^{th}$ dimension is used for time:

\[\langle x,y,z,t\rangle\]

Size

Here is an example:

\[\vert\vert\langle1,-2,2,-4\rangle\vert\vert\]

You will generally be expected to find the euclidean distance.

This example will give:

\[\sqrt{25}=5\]

Spaces

Suppose you are given the following collection:

\[S=\{\langle p,q,r\rangle\in\Bbb Z ^3_8:p^q=q^r\}\]

Three vectors from the set of integers with modulo 8. When we take the first component and raise it to the power of the second modulo 8 we get the same as the second and third

\[H=\Bbb Z_8=\{0,1,2,3,4,5,6,7\}\]
  1. $S$ is closed under scalar multiplication - False
  2. $S$ is not closed under addition. - True
  3. $S$ contains $\langle0,1,1\rangle$. - False
  4. $S$ is a vector space. - False
  5. $S$ does not contain $\langle1,1,0\rangle$. - False

Matrices

You can’t implement translation using a $2\times2$ vector. Scaling and rotation you can.

Example Questions

Polynomials and Properties

  1. Degree 3 and $2x^2$.
  2. Degree 4 and $4x^2$.
  3. Degree 4 and $0x^2$.