# Define the function Z: U → V
Z <- function(u) {
return(0 * u) # Multiply u by the zero vector in V
}
# Verify additivity
u1 <- c(1, 2, 3) # Choose a vector u1 from U (example values)
u2 <- c(-2, 1, 4) # Choose another vector u2 from U (example values)
if (all(Z(u1 + u2) == Z(u1) + Z(u2))) {
print("Additivity property holds.")
} else {
print("Additivity property does not hold.")
}
## [1] "Additivity property holds."
# Verify scalar multiplication
u <- c(3, -1, 2) # Choose a vector u from U (example values)
alpha <- 2 # Choose a scalar alpha (example value)
if (all(Z(alpha * u) == alpha * Z(u))) {
print("Scalar multiplication property holds.")
} else {
print("Scalar multiplication property does not hold.")
}
## [1] "Scalar multiplication property holds."
Conclusion, Z is a “stupid” transformation.