# Discriminant Functions
Discriminant functions do not assume a probabilistic setting and directly find mapping from input to target.
Let's discuss the case for linear discriminant functions. The simplest representation of linear discriminant function is obtained by taking a linear function of the input vector so that
$
y(\mathbf{x})=\mathbf{w}^{\mathrm{T}} \mathbf{x}+w_{0}
$
The decision boundary is defined by the relation $y(\mathbf{x})=0$, which corresponds to a (D-1) dimensional hyperplane within the D-dimensional input space.
Consider two points $\mathbf{x}_A$ and $\mathbf{x}_B$ both of which lie on the decison surface. Because $y(\mathbf{x}_A) = y(\mathbf{x}_B) = 0$, we have $\mathbf{w}^T(\mathbf{x}_A - \mathbf{x}_b) = 0$, which means the $\mathbf{w}$ is orthogonal to the every vector lying on the decision surface, including $(\mathbf{x}_A - \mathbf{x}_B)$. This means $\mathbf{w}$ determinse the orientation of the decision surface.
Similarly, if $\mathbf{x}$ is a point on the decision surface, then $y(\mathbf{x})=0$, so the normal distance from the origin to the decision surface is given by
$
\frac{\mathbf{w}^{\mathrm{T}} \mathbf{x}}{\|\mathbf{w}\|}=-\frac{w_{0}}{\|\mathbf{w}\|}
$
Therefore, the bias parameter $w_0$ determines the loaction of the decision surface.
We can also note that the value of $y(\mathbf{x})$ gives a singed measure of the perpendicular distance $r$ of the point $\mathbf{x}$ from the decision surface. To see this, let's assume an arbitraty point $\mathbf{x}$ and let $\mathbf{x}_{\perp}$ be its orthogonal projection onto the decision surface so that
$
\mathbf{x}=\mathbf{x}_{\perp}+r \frac{\mathbf{w}}{\|\mathbf{w}\|}
$
Multiplying both sides by $\mathbf{w}^T$ and adding $w_0$, and making use of $y\left(\mathbf{x}_{\perp}\right)=\mathbf{w}^{\mathrm{T}} \mathbf{x}_{\perp}+w_{0}=0$,
$
\mathbf{w}^{T} \mathbf{x}+w_{0}={\mathbf{w}^{T} \mathbf{x}_{\perp}}+r \frac{\mathbf{w}^{T} \mathbf{w}}{\|\mathbf{w}\|}+{w}_{0}
$
$
r=\frac{y(\mathbf{x})}{\|\mathbf{w}\|}
$
![[linear discriminant functions.jpg]]