  We introduce a theory of relative tangency for projective algebraic
varieties. The dual variety $X_Z^\vee$ of a variety $X$ relative to a
subvariety $Z$ is the set of hyperplanes tangent to $X$ at a point of $Z$. We
also introduce the concept of polar classes of $X$ relative to $Z$. We explore
the duality of varieties of low rank matrices relative to special linear
sections. In this framework, we study the critical points of the Euclidean
Distance function from a data point to $X$, lying on $Z$. The locus where the
number of such conditional critical points is positive is called the ED data
locus of $X$ given $Z$. The generic number of such critical points defines the
conditional ED degree of $X$ given $Z$. We show the irreducibility of ED data
loci, and we compute their dimensions and degrees in terms of relative
characteristic classes.
