I am trying to write a computer program that displays the perpendicular bisector from one side of a triangle, you can see how it looks so far here.
The two vertices that I want to show the bisector from are $B(6, 18)$ and $C(14, 6)$.
What I can tell from these points is that the midpoint is $(10, 12)$ and the gradient is $$\frac{6-18}{14 - 6} = \frac{-12}{8} = \frac{-3}{2}.$$
So the perpendicular gradient is $\frac 23$.
I now want to show the perpendicular bisector so the midpoint is the point for the start of my line.
The bit I am unsure of is how to get the end of my line given a slope of $\frac 23$ so that is slopes back towards the $y$-axis.
If I apply $\frac 23$ to $(10, 12)$ it will slope upwards from left to right.
Should I apply $\frac{-2}{-3}$ and how do I find the endpoint? Do I multiply $x$ of the midpoint by $-3$ of the gradient and do the same for $y$?
As you say, the perpendicular gradient is $2/3$ and you know the starting point $M=(10,12)$ (midpoint of $BC$). All you have to do is to find a final point $N$ for your perpendicular bisector so that its gradient be $2/3$. If $N=(x,y)$ then you have the equation $$ {y-12\over x-10}={2\over3}. $$
There are infinite solutions to that equation: you can for instance decide the $x$ and find $y$, or the other way around, just to show the two simplest alternatives.