In elementary linear algebra, we talk about matrices, i.e. rectangular arrays of numbers. In advanced linear algebra, we prefer whenever possible to talk about abstract tensors, such as linear operators or bilinear forms, without going into any particular basis. This framing is considered more elegant, and also allows for easier generalization to vector spaces more abstract than the simple case of $\mathbb{R}^n$ for finite $n$.
In particular, I've found that almost all theorems about matrices generalize fairly easily to more abstract theorems about linear operators and/or bilinear forms. (One strong hint as to which one is that matrix similarity is the natural expression of "equivalence" for linear operators, and matrix congruence is the natural expression of "equivalence" for bilinear forms. For an inner product space, the distinction is often blurred, because there's a natural isomorphism between linear operators and bilinear forms.)
But I'm not quite how this works for Sylvester's law of inertia, because it seems to combine elements of both notions without apparently requiring any inner product on the vector space.
Part 1 of Sylvester's law of inertia says that every real symmetric square matrix is congruent to exactly one diagonal matrix with entries 1, -1, and 0 (up to permutation). This pretty clearly seems to generalize to the Wikipedia article's basis-independent statement about real quadratic forms:
For any real quadratic form $Q$, every maximal subspace on which the restriction of $Q$ is positive definite (respectively, negative definite or totally isotropic) has the same dimension.
But I'm confused about part 2 of Sylvester's law of inertia, which says that two symmetric square matrices are congruent iff they have the same numbers of positive, negative, and zero eigenvalues (which equal the numbers of entries 1, -1, and 0 defined in part 1). I'm not sure how to state this in a basis-independent way, because matrix congruence is a equivalence relation on representations of bilinear or quadratic forms, but the notion of eigenvalues only makes sense for linear operators. Moreover, the statement of the theorem doesn't seem to require any inner product that would allow you to naturally convert between the two types of tensors. Is part 2 of Sylvester's law of inertia a statement about forms or about linear operators, and how can we generalize it to tensors in a basis-independent way?
The only solution I can think of, which seems to me to be very much a hack, is to introduce an arbitrary inner product - something like the following:
Let $Q$ be an arbitrary quadratic form on a real vector space $V$, and $B$ be the naturally associated symmetric bilinear form. Define an arbitrary inner product $\langle \rangle$ on V. Consider the unique linear operator $L_{B,\langle \rangle}$ on $V$ associated with $B$, which maps any vector $v$ to the vector $u$ such that $B(v, w) = \langle u, w \rangle$ for all $w \in V$. Then regardless of the choice of inner product $\langle \rangle$, the numbers of positive, negative, and zero eigenvalues of $L_{B, \langle \rangle}$ equal the indices of inertia of $Q$ defined in part 1.
To me, this proposition seems ... rather convoluted. Is there a simpler version?
You are correct that eigenvalues only make sense for operators and not bilinear forms. Maybe the following reinterpretation will look more natural for you:
Let $(V,\left< \cdot, \cdot \right>)$ be a finite dimensional real inner product space. Then we have a bijective correspondence between symmetric bilinear forms $B \colon V \times V \rightarrow \mathbb{R}$ and self-adjoint operators $T \colon V \rightarrow V$. In one direction, it is given by $B \mapsto T_B$ where $T_B$ is the unique linear operator which satisfies $\left< T_B(v), w \right> = B(v,w)$ for all $v, w \in V$.
Now, a priori the eigenvalues of $T_B$ have nothing to do with the inertia of the bilinear form $B$. However, the spectral theorem over $\mathbb{R}$ guarantees that the operator $T_B$ is orthogonally diagonalizable so one can find a $\left< \cdot, \cdot \right>$-orthonormal basis which is also $B$-orthogonal. This implies that under the correspondence $B \mapsto T_B$, the inertia of $B$ corresponds to the number of positive/negative/zero eigenvalues of the operator $T_B$ and so two bilinear forms are congruent iff the corresponding operators have the same number of positive/negative/zero eigenvalues.
I think the main point is that you can think of the classification of symmetric bilinear forms in two ways: