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. 

 A: $\angle DNF = 90^\circ \Longleftrightarrow \angle BNF = \angle CND$. It suffics to prove that $\triangle BNF \sim \triangle CND$.
Well, it's trivial:
$\angle NBF = \angle BEC = \angle NCD$ and $\displaystyle \frac{NB}{BF} = \frac{NB}{BE} = \sin\angle NEB = \cos\angle NCB = \frac{NC}{CB} = \frac{NC}{CD}$. Q.E.D
A: 
Firstly We can write
(1) Oklid relation from $\triangle CNB$ 
$h^2=m(k+x)$  
(2) Pisagor relation from $\triangle DPN$ 
$a^2=(x+k)^2+(x+k+m-h)^2$   
(3) Pisagor relation from $\triangle FRN$
$b^2=h^2+k^2$
(4) Pisagor relation from $\triangle DCF$ 
$c^2=x^2+(x+k+m)^2$

if DNF triange is a right triangle,It must satisfy $a^2+b^2=c^2$. 
$(x+k)^2+(x+k+m-h)^2+h^2+k^2=x^2+(x+k+m)^2$ 
$(x+k)^2+(x+k+m)^2-2h(x+k+m)+h^2+h^2+k^2=x^2+(x+k+m)^2$
$(x+k)^2-2h(x+k+m)+2h^2+k^2=x^2$
$xk+k^2-h(x+k+m)+h^2=0$
$xk+k^2-h(x+k+m)+m(k+x)=0$
$-h(x+k+m)+(k+m)(k+x)=0$
$\frac{x+k}{x+k+m}=\frac{h}{k+m}$
This result is equal to the rates of thales formula for similar triangles   $\triangle CRN \sim \triangle CBE$  
Thus $a^2+b^2=c^2$  is correct for $\triangle DNF$ .
A: 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.
A: HINT: Try to resort to Homothetic transformation and you're done immediately.  Another way is to connect $N$ to the middle of the $DF$ (let's call that point $M$) and prove that you have there $NM$=$DM$=$MF$ (here you may resort to Apollonius' theorem). You also could resort to the cyclic quadrilaterals as another approaching way. 
