Here is the formula that my instructor gave me to solve for torsion in Calc3:
$\tau = \frac{-d\vec{B}}{dS} \cdot{\vec{N}}$
However, I'm having some trouble understanding the intuition behind this formula. I understand that Torsion measures the twist of a function through space, kinda like the normal measures the turn of a function. For example, if we have a spring, then the rise of the spring would represent the torsion. However, I do not understand where the $\cdot{\vec{N}}$ part comes from. Physically, a dot product represents the magnitude of the component of a vector that lies on another vector. But in this case, why do we care about the component of the derivative of the $\vec{B}$ that's on the Normal vector?
In fact this is the whole numerical value of the derivative of $\vec{B}$: since $ \vec{B} \cdot \vec{B} = 1 $, $ \vec{B} \cdot \vec{T} = 0 $ and $ \vec{B} \cdot \vec{N} = 0 $ (by definition: $\vec{B}$ is a unit vector perpendicular to the tangent and normal), we can differentiate to find that $$ 0 = \vec{B} \cdot \frac{d\vec{B}}{ds} , $$ and $$ 0 = \vec{B} \cdot \frac{d\vec{T}}{ds} + \frac{d\vec{B}}{ds} \cdot \vec{T} = \kappa\vec{B} \cdot \vec{N} + \frac{d\vec{B}}{ds} \cdot \vec{T} = \frac{d\vec{B}}{ds} \cdot \vec{T} , $$ so we have found that $\frac{d\vec{B}}{ds} \parallel \vec{N} $. In particular $$ \frac{d\vec{B}}{ds} = \bigg(\vec{N} \cdot \frac{d\vec{B}}{ds} \bigg) \vec{N} : $$ dotting with $\vec{N}$ loses no information from the whole vector. Why do this rather than simply examine $\lVert d\vec{B}/ds \rVert$? Because the sign of $\vec{B}$ tells you which way the curve is bending out of the plane (whether your spring is wound clockwise or anticlockwise, if you like).
(The $-$ sign is purely convention, by the way, and some people use a $+$ instead.)