The number of linearly dependent subsets of size 3 with entries from $\{1,-1,0\}$ 
Let $S$ be a set of all vectors in $\mathbb{R}^{3}$ whose coordinates are in $\{-1,1,0\}$. How many $3$ element subsets of $S$ are linearly dependent?


There are totally $27$ possible vectors. If we fix origin as one vector, then we have $\binom{26}{2}$ choices for the remaining two vectors. Since we can choose a vector and its negative, among all sets having no origin, we have $13*24$ choices to obtain a linearly dependent set.
I can see that there are some vectors that are on a plane, but I don't know how to exhaustively count them! How do we solve this problem?
 A: Let us consider the points of the cube $[-1,0,1]^3$. It is enough to count the number of sets $\{v_1,v_2,v_3\}$ such that $v_1,v_2,v_3$ are collinear or non-collinear but contained in a plane through the origin. Let us focus on the collinear sets first. On each face of the cube we have $3+3+2$ collinear sets (rows, columns, diagonals), so a total of $48-12=36$ collinear sets on the surface. If a collinear set contains two points on distinct faces it has to contain an interior point by convexity. There is a single interior point, namely the origin, so there are $\frac{27-1}{2}=13$ collinear sets through the origin and $49$ collinear sets.
Now we just need to count the non-collinear sets on a plane through the origin. $\binom{26}{2}-13$ triples of this kind contain the origin. Let us assume from now on that our triples do not contain the origin. $13\cdot 24$ non-collinear triples contain a couple of antipodal points. Now it might be useful to classify the points on the surface according to their distance from the origin:

*

*$6$ points, the centers of the faces, have distance $1$ (F, two coordinates equal zero)

*$12$ points, the midpoints of the edges, have distance $\sqrt{2}$ (E, one coordinate equals zero)

*$8$ points, the vertices, have distance $\sqrt{3}$ (V, all coordinates differ from zero)

then to classify the CPNA (coplanar not antipodal) triples according to the number of elements they have in $F,E,V$. There are no CPNA triples with $\geq 2$ elements in $F$ or in $V$. There are $24$ CPNA triples with exactly one vertex. It only remains to count how many CPNA triples have $0$ elements in $V$, i.e. the number of CPNA triples in a cuboctahedron. These triples are made by two elements in $E$ and one element in $F$, or three elements in $E$. The $FEE$ CPNA triples are $12$: they are necessarily made by the center of a face and two opposite midpoints of edges on the opposite face. The $EEE$ CPNA triples lie on hexagonal sections of the cube, like the one given by $x+y+z=0$. There are four hexagonal sections of this kind (as many as the diameters of the cube), so there are $4\left(\binom{6}{3}-12\right)=32$ $EEE$ CPNA triples.
If I have not miscounted something, there should be $741$ linearly dependent triples.
