Problem 1

|2^3 - 3^2|

abs(2**3-3**2)
## [1] 1

Problem 2

e^e

exp(exp(1))
## [1] 15.15426

Problem 3

\(2.3^8 + \ln(7.5) −\cos(\pi/\sqrt{2})\)

2.3**8 + log(7.5) - cos(pi/sqrt(2))
## [1] 785.7305

Problem 4

A <-  cbind(c(1,2,4),c(2,1,7),c(3,6,2),c(2,4,5))
B <- cbind(c(1,0,2,1), c(3,1,4,5), c(5,3,7,1), c(2,4,3,2))
# A <-  matrix(c(1,2,4,2,1,7,3,6,2,2,4,5), nrow=3, ncol=4)
# B <- matrix(c(1,0,2,1,3,1,4,5,5,3,7,1,2,4,3,2), nrow=4,ncol=4)
B %*% t(A)
##      [,1] [,2] [,3]
## [1,]   26   43   45
## [2,]   19   35   33
## [3,]   37   62   65
## [4,]   18   21   51
A %*% solve(B)
##      [,1]      [,2]      [,3]       [,4]
## [1,] -0.5 0.1739130 0.6956522  0.1086957
## [2,] -2.5 0.6086957 2.4347826 -0.3695652
## [3,] -6.0 0.3043478 4.2173913  1.5652174

Problem 5

v1 <- c(2,5,6,7)
v2 <- c(-1,3,-1,-1)
sum(v1*v2)
## [1] 0