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 ejercicio forma parte del curso
Linear Algebra for Data Science in R
Instrucciones del ejercicio
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
?
Ejercicio interactivo práctico
Prueba este ejercicio completando el código de muestra.
# Multiply A by b
A%*%___
# Multiply B by b
___%*%b
# Multiply C by b
C___b