In[]:=
dsq[p_,q_]:=(p-q).(p-q);
In[]:=
pts={{0,0},{1,0},{1,1},{2,2}};
In[]:=
l=Length@pts;
In[]:=
num=Table[{(i-1)/(l-1),pts[[i]]},{i,1,Length@pts}];
In[]:=
c=.;
In[]:=
c=Interpolation[num]
Out[]=
InterpolatingFunction
Domain: {{0,1}}
Output dimensions: {2}

In[]:=
q={2,-1};
In[]:=
Show[​​ParametricPlot[c[t],{t,0,1}],​​ListPlot[{q},PlotStyleRed],​​PlotRangeAll​​]
Out[]=
0.5
1.0
1.5
2.0
-1.0
-0.5
0.5
1.0
1.5
2.0
In[]:=
FindMinimum[dsq[c[t],q],{t,.3,.301}]
FindMinimum
:The function value {4.95697,5.13056} is not a real number at {t} = {0.3}.
Out[]=
FindMinimum[dsq[c[t],q],{t,0.3,0.301}]
In[]:=
pts1=Map[#[[1]]&,pts];​​pts2=Map[#[[2]]&,pts];​​num1=Table[{(i-1)/(l-1),pts1[[i]]},{i,1,Length@pts1}];​​num2=Table[{(i-1)/(l-1),pts2[[i]]},{i,1,Length@pts2}];​​c1=Interpolation[num1];​​c2=Interpolation[num2];​​
In[]:=
FindMinimum[dsq[{c1[t],c2[t]},q],{t,.3,.301}]
Out[]=
{1.90331,{t0.270448}}