# Finding the sin of the angle between two vectors

### Problem:

 Find sin(t) where t is the angle between v and w with,

> v := i+j; w := i+j+k;

```                                  v := i + j

w := i + j + k```

#### Note:

 Here I am assuming that the maple session already knows about linalg and the vectors i,j and k. If you start a clean session without any pre-loading of anything then you MUST first load the linalg package with "with(linalg):" and then define i,j and k as "i := [1,0,0]" etc...

#### Solution:

 First define the length function as,

> len := vec -> sqrt(dotprod(vec,vec)):
 and then get sin(t) from the geometric definition of the crossprod,

> sint := len(crossprod(v,w))/(len(v)*len(w));

```                                            1/2
sint := 1/3 3```
 this corresponds to an angle of,

> convert(angle(v,w),degrees);

```                                       1/2  1/2
arccos(1/3 2    3   ) degrees
180 -----------------------------
Pi```
> evalf(%);
`                              35.26438968 degrees`

Link to the commands in this file
Carlos Rodriguez <carlos@math.albany.edu>