<s>[INST] Angle of a triangle inscribed in a square Say we have a square $ABCD$. Put points $E$ and $F$ on sides $AB$ and $BC$ respectively, so that  $BE = BF$. Let $BN$ be the altitude in triangle $BCE$. What is $\angle DNF$?
I'm inclined to say that it's a right angle because that's what it looks like from what I've drawn, but I have no idea how to proceed. 

 [/INST] Let us do it through coordinate geometry. Let $B$ be the origin. Lets fix the coordinates first. $$A = (0,a)\\ B = (0,0) \\ C = (a,0)\\ D = (a,a)$$ Since $E$ and $F$ are equidistant from $B$, lets say $$F = (b,0)\\ E = (0,b)$$ where $0 \leq b \leq a$. The equation of the line $CE$ is $\dfrac{x}{a} + \dfrac{y}{b} = 1$. The equation of $BN$ is $y = \dfrac{a}{b}x$. This gives us the coordinate of $N$ as $\left( \dfrac{ab^2}{a^2 + b^2},\dfrac{a^2b}{a^2 + b^2} \right)$.
The slope of $FN$ is $m_1 = \dfrac{a^2b/(a^2+b^2) - 0}{ab^2/(a^2+b^2)-b} = \dfrac{a^2}{ab - a^2 - b^2}$.
The slope of $DN$ is $m_2 = \dfrac{a^2b/(a^2+b^2) - a}{ab^2/(a^2+b^2)-a} = \dfrac{ab - a^2 - b^2}{b^2 - a^2 - b^2} = - \left(\dfrac{ab-a^2-b^2}{a^2} \right)$.
Hence, the product of the slopes is $m_1m_2 = -1$. Hence your conjecture is indeed correct. I am waiting for someone to post a nicer geometric argument.
</s>