Sufficient condition for lines in triangle to be altitudes It is known that if point $D$ is the orthocenter [the uniquely determined point of intersection of all altitudes] of triangle $ABC$ then the following holds:
$$BD\cdot DE = FD\cdot DA = GD\cdot DC \tag{1}$$
Now, let $GC$, $AF$ and $EB$ be some lines that intersect at common point $D$ and let $(1)$ also be satisfied. Is it sufficient for $D$ to be the orthocenter? Equivalently, are the lines through $A, B, C$ perpendicular to their respective opposite sides?

 A: It helps order things in the mind if the naming is consistent -- starting ordering with the triangle vertex we are given
$AD \cdot DF = BD \cdot DE = CD \cdot DG$ in triangle $ABC$.
Doing some dividing, we see  $AD/DE = BD/DF; AD/DG = CD/DF ; BD/DG = CD/DE$.
Then we have a bunch of vertically opposite angles.
$ \angle ADE = \angle BDF,\ \  \angle ADG = \angle CDF,\ \  \angle BDG = \angle CDE$.
So we have a lot of similar triangles.
$ \triangle ADE \sim \triangle BDF,\ \  \triangle ADG \sim \triangle CDF,\ \  \triangle BDG \sim \triangle CDE$.
Then we have a lot of equal corresponding angles
$\angle AGD = \angle CFD,\ \  \angle AED = \angle BFD,\ \  \angle BGD = \angle CED$
PLEASE NOTE:
Correction: I made an unjustified assumption and hurried to the conclusion here. Please OMIT the part below between the ********* lines, and instead as in comments below work with supplementary angles and an easy chain of equalities:
After proving $ \angle AGD= \angle CFD, \angle AED=\angle BFD, \angle BGD=\angle CED $
Then as supplementary angles  $ \angle AED +\angle CED=180; \angle BGD+\angle AGD=180; \angle CFD+\angle BFD=180. $
$\angle BFD =  \angle AED =180 -\angle CED = 180 - \angle BGD = \angle AGD = \angle CFD $ and BFC is a straight line so $\angle BFD = \angle CFD = 90$  And similarly for the other two sides of the triangle.

OMIT below
Pairs of these are opposite angles in quadrilaterals so must sum to 180 degrees.
$ \angle AED + \angle AGD = 180; \ \  \angle BGD + \angle BFD = 180; \ \ \angle CED + \angle CFD = 180.$
Suppose $\angle ADE = \angle BFD < 90$ Then by the above sums $\angle AGD = \angle BGD > 90$ which is impossible since AGB is a straight line. Similarly these angles cannot be $>90$. We can work similarly around all three sides of the triangle.
OMIT above

$\angle AGD = \angle CFD = \angle AED = \angle BFD = \angle BGD = \angle CED = 90$
and $AF, BE, CG$ are all altitudes as required.
A: 
The identity $BD \cdot DE = FD \cdot DA$ holds if and only if the four points $A, B, F$ and $E$ lie on a common circle, call it $g$. Analogously, $FD \cdot DA = CD \cdot DC$ holds if and only if the four points $A, C, F$ and $G$ lie on a common circle, call it $e$. By the same argument the points $B, C, E$ and $G$ lie on a common circle $f$.
Observe that in circle $e$ the following angle equality holds
$$\angle \, FCG = \angle \, FAG = \angle \, FAB$$
In circle $g$ the following angle equality holds
$$\angle \, FEB = \angle \, FAB$$ Therefore $$\angle \, FCD = \angle \, FCG = \angle \, FEB = \angle \, FED$$
Therefore the quad $CEDF$ is inscribed in a circle so $$\angle \, DEC = 180^{\circ} - \angle \, DFC = \angle \, BFD = \angle \, BFA$$ Hence $$\angle \, BEC = \angle \, DEC = \angle \, BFA$$ However in circle $g$
$$\angle \, BEA = \angle \, BFA$$
so $\angle \, BEA = \angle \, BFA = \angle \, BEC$ and since $E$ lies on the line $AC$, the identity $\angle \, BEA =  \angle \, BEC$ implies that $BE$ is orthogonal to $AC$.
Analogously, one shows that $AF$ is orthogonal to $BC$ and $CG$ is orthogonal to $AB$.
