### Ternary Linear Codes and Quadrics

#### Abstract

For an $[n,k,d]_3$ code ${\cal C}$ with $gcd(d,3)=1$, we define a map $w_G$ from $\Sigma={\rm PG}(k-1,3)$ to the set of weights of codewords of ${\cal C}$ through a generator matrix $G$. A $t$-flat $\Pi$ in $\Sigma$ is called an $(i,j)_t$ flat if $(i,j)=(|\Pi \cap F_0|,|\Pi \cap F_1|)$, where $F_0 = \{P \in \Sigma | w_G(P) \equiv 0 \pmod{3}\}$, $F_1 = \{P \in \Sigma | w_G(P) \not\equiv 0,d \pmod{3}\}$. We give geometric characterizations of $(i,j)_t$ flats, which involve quadrics. As an application to the optimal linear codes problem, we prove the non-existence of a $[305,6,202]_3$ code, which is a new result.