# Null space of the Jacobian matrix for a robotic arm

I have doubts on how to find all the joint velocities that don't produce any linear velocity, so are in the Null space, when we are in a singular configuration. For example, suppose we have a 2R planar robotic arm. If we compute the Jacobian we have:

$$J(q)= \begin{bmatrix}-l_1sin(q1)-l_2sin(q1+q2) & -l_2sin(q1+q2)\\ l_1cos(q1)+l_2cos(q1+q2) & l_2cos(q1+q2)\end{bmatrix}$$

and if we consider the sigular configuration for which $$q_2=0$$ we have:

$$J(q)= \begin{bmatrix}-(l_1+l_2)sin(q1) & -l_2sin(q1)\\ (l_1+l_2)cos(q1) & l_2cos(q1)\end{bmatrix}$$

now i want to find the joint velocities that produce no linear velocity of the end-effector, so all the velocities that arein the Null space. I have that those are all the velocities of the type :

$$N(J)= \alpha \begin{bmatrix} l_2\\ -(l_1+l_2) \end{bmatrix}$$

but i don't understand how this result is obtained.

Quite easily, by applying the definition of the Null Space straight away, you have to solve for: $$\mathbf{J} \left( q_1,q_2=0\right) \cdot \left[\dot{q_1}, \dot{q_2} \right]^T = 0.$$ You'll come up with the following relation: $$\frac{\dot{q_1}}{\dot{q_2}} = - \frac{l_2}{l_1+l_2},$$ which in turn can be summarized by $$\mathcal{N} \left( \mathbf{J} \right)$$.