Reflections
In the last exercise, you looked at stretching or shrinking components of a vector.
In this one, you'll apply a reflection matrix to the vector b <- c(2, 1)
.
Este exercício faz parte do curso
Linear Algebra for Data Science in R
Instruções do exercício
A
,B
,C
andb
are loaded for you. Use matrix multiplication in R to show that multiplication by the matrix \(A\) with R output:
> A
[,1] [,2]
[1,] -1 0
[2,] 0 1
reflects the vector
b = c(2, 1)
about the y axis.
- Show that multiplication by the matrix \(B\) with R output:
> B
[,1] [,2]
[1,] 1 0
[2,] 0 -1
reflects b
about the x axis.
- What does the matrix \(C\) with R output:
> C
[,1] [,2]
[1,] -4 0
[2,] 0 -2
do to b
?
Exercício interativo prático
Experimente este exercício completando este código de exemplo.
# Multiply A by b
A%*%___
# Multiply B by b
___%*%b
# Multiply C by b
C___b