# Creating a special vector from two vectors

I have two vectors (and their two dimensional components): $\vec{AB}$ and $\vec{AC}$ that have the same length.
How can I calculate a vector $\vec{AD}$ components that satisfies
$\angle {DBA} = \angle {DCA} = 90$
$\angle {DAB} = \angle {DAC}$

Basically I need the result vector to be angle bisector of the two vectors, and create two right triangles with the vectors where the right angle in each is in the end point of the vectors (not on the result vector).

This is not homework. its for an application I develop and I have no clue how to solve it.

Edit: an image of what I need with my amazing drawing skills:

-
I'm having a hard time seeing how one could make a vector that is simultaneously perpendicular to two other vectors. Maybe you can make a sketch that shows what you want to happen? – J. M. Sep 2 '11 at 0:18
@J. M. its not perpendicular to them. the vector that connects the two endpoints $\vec {BD}$ is perpendicular to $\vec {AB}$ and same for the other vector. – Dani Sep 2 '11 at 0:24
@J. M. added an image. – Dani Sep 2 '11 at 0:29

Because $AB$ and $AC$ are the same length, $\angle DAB = \angle DAC$ if $AD$ is along the direction of $AB + AC$, that is, $$AD = \alpha(AB + AC).$$ Now $\angle DBA = 90^\circ$ means that $AB \cdot BD = 0,$ so $$AB \cdot (\alpha (AB + AC) - AB) = 0$$ $$\alpha = \frac{\lvert AB \rvert^2}{\lvert AB \rvert^2 + AB\cdot AC}$$
Here goes: let $A$ be the origin, and let $B$ have the coordinates $(-x_b,y_b)$ and $C$ have the coordinates $(x_b,y_b)$. (The system can always be rotated for this to apply.)
The line through $A$ and $C$ has the slope $\frac{y_b}{x_b}$, and thus a line perpendicular to it at $C$ should be of the form $y=y_b-\frac{x_b}{y_b}(x-x_b)$ One could use a similar argument to form the equation of the perpendicular through $A$ as $y=y_b+\frac{x_b}{y_b}(x+x_b)$. Solving these two equations simultaneously yields the coordinates of $D$ as $\left(0,\frac{x_b^2+y_b^2}{y_b}\right)$.