3. In space, there are nine points, among which no four points are coplanar. Connect several line segments between these nine points so that there is no tetrahedron in the graph. Then the graph can have at most ( ) triangles.
(A) 21
(B) 24
(C) 25
(D) 27
3. (D)

Divide nine points $A_{1}, A_{2}, \cdots, A_{9}$ into three groups $\mid A_{1}, A_{2}$, $\left.A_{3}\right\},\left\{A_{4}, A_{5}, A_{6}\right\},\left\{A_{7}, A_{8}, A_{4}\right\}$, such that no two points within the same group are connected, while any two points from different groups are connected. For any point, there are at least two points in the same group that are not connected, so there are no triangles in the graph. In this case, there are $C_{3}^{1} \cdot C_{3}^{1} \cdot C_{3}^{1}=27$ triangles.