1. **State the problem:**
We are given a geometric figure with points B, F, C, E, and A such that angles \(\angle BAE\) and \(\angle BCE\) are right angles, and \(AE = FE\). Given \(AB = 4\) and \(BF = 2\), we need to find the length of \(CF\).
2. **Analyze the figure and given information:**
- \(\angle BAE = 90^\circ\) means segment \(AE\) is perpendicular to \(AB\).
- \(\angle BCE = 90^\circ\) means segment \(CE\) is perpendicular to \(BC\).
- \(AE = FE\) means triangle \(AFE\) is isosceles with \(AE = FE\).
- \(AB = 4\) and \(BF = 2\) are given lengths.
3. **Set up a coordinate system for clarity:**
Place point \(B\) at the origin \((0,0)\).
Since \(AB = 4\) and \(\angle BAE = 90^\circ\), place \(A\) at \((4,0)\).
Since \(BF = 2\) and \(B\) is at \((0,0)\), place \(F\) at \((0,2)\).
4. **Find coordinates of points \(E\) and \(C\):**
Since \(AE = FE\) and \(A = (4,0)\), \(F = (0,2)\), point \(E\) lies such that distances \(AE = FE\).
Let \(E = (x,y)\).
Distance \(AE = \sqrt{(x-4)^2 + (y-0)^2}\).
Distance \(FE = \sqrt{(x-0)^2 + (y-2)^2}\).
Set equal:
$$\sqrt{(x-4)^2 + y^2} = \sqrt{x^2 + (y-2)^2}$$
Square both sides:
$$(x-4)^2 + y^2 = x^2 + (y-2)^2$$
Expand:
$$x^2 - 8x + 16 + y^2 = x^2 + y^2 - 4y + 4$$
Simplify:
$$-8x + 16 = -4y + 4$$
Rearranged:
$$-8x + 16 + 4y - 4 = 0$$
$$-8x + 4y + 12 = 0$$
Divide by 4:
$$-2x + y + 3 = 0$$
So,
$$y = 2x - 3$$
5. **Use right angle \(\angle BCE = 90^\circ\):**
Points \(B = (0,0)\), \(C = (c_x, c_y)\), \(E = (x,y)\).
Since \(\angle BCE = 90^\circ\), vectors \(CB\) and \(CE\) are perpendicular.
Vectors:
$$\overrightarrow{CB} = (0 - c_x, 0 - c_y) = (-c_x, -c_y)$$
$$\overrightarrow{CE} = (x - c_x, y - c_y)$$
Dot product zero:
$$\overrightarrow{CB} \cdot \overrightarrow{CE} = 0$$
$$(-c_x)(x - c_x) + (-c_y)(y - c_y) = 0$$
$$-c_x x + c_x^2 - c_y y + c_y^2 = 0$$
Rearranged:
$$c_x^2 + c_y^2 = c_x x + c_y y$$
6. **Use the fact that \(F = (0,2)\) lies on segment \(FC\):**
We want to find \(CF\), so we need coordinates of \(C\).
7. **Use the fact that \(B, F, C\) are collinear vertically:**
Since \(B = (0,0)\) and \(F = (0,2)\), and \(F\) lies between \(B\) and \(C\), \(C\) must be on the vertical line \(x=0\).
So, \(c_x = 0\).
8. **Substitute \(c_x = 0\) into the dot product equation:**
$$0 + c_y^2 = 0 + c_y y$$
If \(c_y \neq 0\), divide both sides by \(c_y\):
$$c_y = y$$
9. **So, \(C = (0, y)\) and \(E = (x, y)\) with \(y = 2x - 3\).**
10. **Find length \(CF\):**
\(F = (0,2)\), \(C = (0,y)\), so
$$CF = |y - 2|$$
11. **Find \(x\) and \(y\) using the fact that \(E\) lies on segment \(FE\) and \(AE = FE\):**
Recall from step 4:
$$y = 2x - 3$$
12. **Use the fact that \(E\) lies on line segment \(FE\):**
Since \(F = (0,2)\) and \(E = (x,y)\), and \(AE = FE\), we can find \(x\) and \(y\) by considering the length of \(AE\) and \(FE\).
13. **Calculate \(AE\) and \(FE\) in terms of \(x\):**
$$AE = \sqrt{(x-4)^2 + y^2} = \sqrt{(x-4)^2 + (2x - 3)^2}$$
$$FE = \sqrt{(x-0)^2 + (y-2)^2} = \sqrt{x^2 + (2x - 3 - 2)^2} = \sqrt{x^2 + (2x - 5)^2}$$
14. **Set \(AE = FE\) and square both sides:**
$$(x-4)^2 + (2x - 3)^2 = x^2 + (2x - 5)^2$$
Expand:
$$(x^2 - 8x + 16) + (4x^2 - 12x + 9) = x^2 + (4x^2 - 20x + 25)$$
Simplify left:
$$5x^2 - 20x + 25 = x^2 + 4x^2 - 20x + 25$$
Simplify right:
$$5x^2 - 20x + 25 = 5x^2 - 20x + 25$$
Both sides are equal for all \(x\), so this confirms the relation but does not determine \(x\).
15. **Use the fact that \(E\) lies on line segment \(BE\):**
Since \(B = (0,0)\) and \(E = (x,y)\), and \(\angle BAE = 90^\circ\), point \(E\) lies on the line perpendicular to \(AB\) at \(A\).
Since \(AB\) is horizontal from \((0,0)\) to \((4,0)\), the perpendicular line at \(A\) is vertical at \(x=4\).
16. **Therefore, \(x = 4\).**
17. **Find \(y\):**
From step 4:
$$y = 2x - 3 = 2(4) - 3 = 8 - 3 = 5$$
18. **Find \(CF\):**
\(C = (0,y) = (0,5)\), \(F = (0,2)\), so
$$CF = |5 - 2| = 3$$
**Final answer:**
$$\boxed{3}$$
Length Cf E80E18
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.