I have to prove that all ternary linear codes must contain the all zero codeword.
Some term explanations: A linear code is a code that the sum of any two codewords must also be a codeword. In other words, for all x, y in C, x +/- y is also in C.
A ternary codeword in this exercise is a codeword containing 0, 1 or 2. Eg, 1011, 1012, 012, ... An all zero codeword is something like 0000, 000, 00000, ...
My attempt:
The addition of codewords must be done MOD 3 which means there are three allowable numbers in this MOD 3 world including 0, 1 and 2.
I am not sure about the proof. I have an idea that it must deal with the MOD 3 but not sure how to explain. Thank you so much!
You've now deleted the word “difference” in the question. But over a finite field, containing all sums implies containing all differences. If the code contains $x$, it contains $x+x$, $x+x+x$, etc., and over a finite field this is eventually zero. In the case of a ternary code, $x+x+x$ is zero.