Problem: Consider systems of three linear equations with unknowns $x$ $y$ , and $z$ \begin{align*} a_1 x + b_1 y + c_1 z & = 0 \\ a_2 x + b_2 y + c_2 z & = 0 \\ a_3 x + b_3 y + c_3 z & = 0 \end{align*} where each of the coefficients is either $0$ or $1$ and the system has a solution other than $x=y=z=0$ .
For example, one such system is \[\{ 1x + 1y + 0z = 0, 0x + 1y + 1z = 0, 0x + 0y + 0z = 0 \}\] with a nonzero solution of $\{x,y,z\} = \{1, -1, 1\}$ . How many such systems of equations are there?
(The equations in a system need not be distinct, and two systems containing the same equations in a
different order are considered different.)
$\textbf{(A)}\ 302 \qquad\textbf{(B)}\ 338 \qquad\textbf{(C)}\ 340 \qquad\textbf{(D)}\ 343 \qquad\textbf{(E)}\ 344$

Solution: We will use complementary counting and do casework on the equations.
There are $8$ possible equations:
Equation 1: $0 = 0$
Equation 2: $x = 0$
Equation 3: $y = 0$
Equation 4: $z = 0$
Equation 5: $x + y = 0$
Equation 6: $x + z = 0$
Equation 7: $y + z = 0$
Equation 8: $x + y + z = 0$
We will continue to refer to the equations by their number on this list.
$8^3 = 512$ total systems. Note that no two equations by themselves can force $x = y = z = 0$ . Therefore no system with Equation 1 or with repeated equations can force $x = y = z = 0$
Case 1: Equation 8 ( $x + y + z = 0$ ) is present.
Case 1a: Equation 8, and two equations from $\{5, 6, 7\}$
There are $\binom{3}{2} = 3$ ways to choose two equations from $\{5, 6, 7\}$ and $3! = 6$ ways to arrange each case. The number of options that force $x = y = z = 0$ is $3 \cdot 3! = 18$
Case 1b: Equation 8, one equation from $\{5, 6, 7\}$ , and one equation from $\{2, 3, 4\}$
There are $\binom{3}{1} = 3$ ways to choose one equation from $\{5, 6, 7\}$ . WLOG let us choose Equation 7. Given $x + y + z = 0$ and $y + z = 0$ , we conclude that $x = 0$ . The third equation can be either $y = 0$ or $z = 0$ . There are $3!$ ways to arrange each case. The number of options that force $x = y = z = 0$ is $3 \cdot 2 \cdot 3! = 36$
Case 1c: Equation 8, and two equations from $\{2, 3, 4\}$
There are $\binom{3}{2} = 3$ ways to choose two equations from $\{2, 3, 4\}$ and $3! = 6$ ways to arrange each case. Each of these cases forces $x = y = z = 0$ $3 \cdot 3! = 18$ total options.
Case 2: Equation 8 is $\textbf{not}$ present, at least one equation from $\{5, 6, 7\}$ is present.
Case 2a: Equations $\{5, 6, 7\}$ are all present.
There are $3!$ ways to arrange the three equations. $6$ options.
Case 2b: Two equations from $\{5, 6, 7\}$ are present. One equation from $\{2, 3, 4\}$ is present.
There are $\binom{3}{2}$ ways to choose two equations from $\{5, 6, 7\}$ . WLOG let Equations 5 and 6 be in our system: $x + y = 0$ and $x + z = 0$ . Any equation from $\{2, 3, 4\}$ will force $x = y = z = 0$ . There are $3!$ ways to arrange the equations. The number of options that force $x = y = z = 0$ is $\binom{3}{2} \cdot \binom{3}{1} \cdot 3! = 54$
Case 2c: One equation from $\{5, 6, 7\}$ is present. Two equations from $\{2, 3, 4\}$ are present.
There are $\binom{3}{1}$ ways to choose one equation from $\{5, 6, 7\}$ . WLOG let Equation 5 ( $x + y = 0$ ) be present. One of the two equations from $\{2, 3, 4\}$ must be Equation 4, $z = 0$ , since it is the only equation that restricts $z$ . The last equation can be either 2 or 3. There are $3!$ ways to arrange the equations. The number of options that force $x = y = z = 0$ is $\binom{3}{1} \cdot \binom{2}{1} \cdot 3! = 36$
Case 3: Only equations $\{2, 3, 4\}$ are present.
There are $3!$ ways to arrange the three equations. $6$ options.
We add up the cases: $18 + 36 + 18 + 6 + 54 + 36 + 6 = 174$ total systems force $x = y = z = 0$ . Thus $512 - 174 = \boxed{338}$ do not.

Answer: B 338