Vector \(a\) is orthogonal to \(v\) because their dot product is zero:\[v \cdot a = (2)(1) + (-1)(2) + (3)(0) = 2 - 2 + 0 = 0\]Vectors \(b\), \(c\), and \(d\) are not orthogonal because their dot products with \(v\) are non-zero (\(v \cdot b = 4\), \(v \cdot c = 12\), \(v \cdot d = 13\)).
Question 2
A.
Matrix \(A\): Yields a \(2 \rightarrow 1\) transformation because \(\det(A) = (2)(2) - (4)(1) = 0\) (rank 1, collapses data onto a 1D line).Matrix \(B\): Yields a \(2 \rightarrow 2\) transformation because \(\det(B) = (1)(0) - (2)(-1) = 2 \neq 0\) (full rank).Matrix \(C\): Yields a \(2 \rightarrow 1\) transformation because \(\det(C) = (6)(1) - (2)(3) = 0\) (rank 1, collapses data onto a 1D line).Matrix \(D\): Yields a \(2 \rightarrow 2\) transformation because \(\det(D) = (1)(5) - (2)(3) = -1 \neq 0\) (full rank).
Consider the four transformation matrices below. Which of these yield \(2 \rightarrow 2\) transformations, and which yield \(2\rightarrow 1\) transformations? Justify your response.
# Set up ggplot template: (plot_template <-ggplot() +scale_x_continuous(breaks=seq(-10,10,by=1),limits=c(-10,10)) +scale_y_continuous(breaks=seq(-10,10,by=1),limits=c(-10,10)) +geom_vline(aes(xintercept =0)) +geom_hline(aes(yintercept =0)) +theme_minimal(base_size =14) +theme(panel.grid.minor =element_blank()) +labs(x='X1', y='X2'))
# Add points: (Xplot <- plot_template +geom_point(aes(x = X1, y = X2), data = X)+ggtitle('Plot of X'))
Transform \(X\) using the matrices from A) and create four scatterplots of the resulting linear transformations. Replace the four plots below with plots of the linear transformations. Make sure to change titles of each plot to indicate which transformation matrix produced the plot.
You’re looking at the sky and notice ursa major (aka: the big dipper). Let Dipper represent the matrix of 7 rows of 2 dimensional vectors shown in this plot:
You hop in a space craft and travel half the distance to ursa major. Now it looks like this:
What matrix A is such that Dipper x A produces the vectors shown above? You should be able to answer this by reasoning about how the coordinates have changed (no matrix multiplication in R required.)
Then create A, the transformation Dipper %*% A, and plot the transformation Dipper %*% A to verify your guess.
A <-matrix(c(2, 0, 0, 2), nrow =2, ncol =2)Dipper_A <-as.data.frame(as.matrix(Dipper) %*% A) %>%setNames(c("X1", "X2"))plot_template +geom_point(data = Dipper_A, aes(x = X1, y = X2), pch =8, size =3)
B.
Your friend in the space craft is upside down. They look up and see this:
What matrix \(B\) is such that Dipper %*% B produce the vectors above? You should be able to answer this by reasoning about how the coordinates have changed with respect to A), and using the commuting property of transformations.
Then create B, the transformation Dipper %*% B, and plot the transformation Dipper x B to verify your guess.
B <-matrix(c(2, 0, 0, -2), nrow =2, ncol =2)Dipper_B <-as.data.frame(as.matrix(Dipper) %*% B) %>%setNames(c("X1", "X2"))plot_template +geom_point(data = Dipper_B, aes(x = X1, y = X2), pch =8, size =3)
C.
A black hole has warped and twisted the dipper!
Find the black hole transformation matrix \(C\) such that Dipper %*% C produces the image above. (You can use R entirely to determine \(C\) here.) Check that you’ve found the correct matrix by creating and plotting Dipper %*% C.