Linear Algebra with JavaScript: Vectors

Rodion Chachura
May 3 · 6 min read
GitHub Repository with Source Code
the vector in 2D space

Vector Operations

basic vector operations

Addition and Subtraction

vectors addition
vectors subtraction


scaling vector


vectors length

Dot Product

dot product
using dot product

Cross Product

Other useful methods

Angle Between


Project On

project v on d

With Length

Equal To

Unit Vector and Basis

standard basis {i, ̂j, ̂k}
vector with respect to basis {ê₁, ê₂, ê₃}

Pomodoro by Increaser

Rodion Chachura

Written by

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade