# Projection of vector

I'm working to reproduce an example made in GeoGebra* using Sage. What I got in GeoGebra looks like this,

- would add link if I could …

The goal is to find the length of _j_ only knowing _A_, _B_, and _C_.

Here's where I'm at in Sage, it seems really smart, but all help files and templates I find online feels way too advanced for where I'm currently at. I've written the code below and it's currently look like this,

code (thanks to @tmonteil I've been able to update my code with some calculations, I am still struggling to produce the plot),

```
A = (9, 5); B = (2, 4); C = (16, -2);
AB = vector(B)-vector(A)
BC = vector(C)-vector(B)
P = plot(x,(x,2,5), color='red')
P += AB.plot(color='green', start=A)
P += BC.plot(color='green', start=B)
print "Length of AB proj. onto BC"
show(P, figsize=5, aspect_ratio=1)
# show(AB.inner_product(BC)/BC.norm()^2*v2)
show(AB.inner_product(BC)/BC.norm())
RDF(AB.inner_product(BC)/BC.norm())
```