---
title: "MATH 542 | Assignment 1"
author: "Saket Choudhary"
date: "1/16/2016"
output: pdf_document
---

### Problem 1

$|2^3 - 3^2|$
```{r}
abs(2**3-3**2)
```

### Problem 2
$e^e$

```{r}
exp(exp(1))
```

### Problem 3

$2.3^8 + log(7.5) - cos \frac{\pi}{\sqrt{2}}$

```{r}
2.3**8 + log(7.5) - cos(pi/sqrt(2))
```

### Problem 4

```{r}
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)
```

```{r}
A %*% solve(B)
```
      
      
### Problem 5

```{r}
v1 <- c(2,5,6,7)
v2 <- c(-1,3,-1,-1)
sum(v1*v2)
```