Mathematically, what is a graviton? There are numerous questions on this site asking what a graviton is, but almost all the answers are superficial. I am hoping for a more formal answer.
All I know in the here and now, is that it has spin 2 and is a rank-2 tensor. I am trying to build up a better picture of it. Can we get a list of properties that it has?

*

*For instance, is it a solution to a specific Lagrangian; if so what is the Lagrangian?


*How many dimensions does the rank 2 tensor has --- Does it have 4, in which case it is a rank-2 tensor of 4x4 dimensions, and not just rank-2 of nxn dimensions?


*What equation is responsible for assigning it a spin of 2; is it the Lagrangian that enforces that, or is it merely a property of rank-2 tensors?


*Does it have any requirements of the entries to the tensor, for instance must it be symmetric (like the metric tensor of general relativity), or are the entries arbitrary?


*The rank-2 tensor in 4 dimensions admits 16 free variables. Is this the case for a graviton -- all 16 free variables are admitted, no restriction on the freedom?


*Can one represent a graviton with a matrix. If so, can you provide an example of such a matrix --- if for no other reason than to fix the idea.
 A: You start with General Relativity, with the Einstein-Hilbert Lagrangian.
Then you choose a background metric which is the solution of vacuum Einstein equations. Usually it is chosen to be the Minkowski space-time.
Then you write the metric field as
$$ g_{\mu \nu} = \eta_{\mu \nu} + h_{\mu \nu}. $$
Here $g_{\mu \nu}$ is the spacetime metric tensor; $\eta_{\mu \nu}$ is the background metric tensor (Minkowski metric), and $h_{\mu \nu}$ is a symmetric tensor that represents the difference between the two.
As long as your spacetime is topologically $\mathbb{R}^4$, you can always write this down. However, what comes next only works in the weak gravity approximation. We assume that
$$ h_{\mu \nu} \ll \eta_{\mu \nu} $$
and so that the causality structure can be approximated by the Minkowski causality structure (light cones) of $\eta_{\mu \nu}$, since $h_{\mu \nu}$ is a small fluctuation and doesn't play a big role.
It is incredibly important for the quantum theory that the weak field assumption is being made at this step. In QFT, we can treat the fluctuation $h_{\mu \nu}$ as a Wightman quantum field that lives on the Minkowski space and obeys Wightman axioms, including the axiom that states that smeared operators $\hat{h}$ commute when their supports are spacelike separated. Here, "spacelike" is w.r.t. $\eta$.
In the strong field regime, this axiom no longer makes sense. Instead, we should adopt the definition of "spacelike" that comes from $g$, not $\eta$, but $g$ has $h$ itself in it which is a quantum field, so the entire formalism breaks down. Gravity can't be a Wightman QFT in the strong field regime. In fact we can definitely expect something weird to happen here. What exactly happens depends on your quantum gravity model. E.g. in LQG space-time itself acquires discrete properties. Since we don't (yet) have a satisfactory quantum gravity model, we can't say what happens in the strong field regime.
But if you restrict yourself to weak field regime, you can write down the Einstein-Hilbert action to order $\mathcal{O}(h^2)$ and throw away the higher order terms. You will get a free field theory on Minkowski space, which can be quantized. The resulting theory has noninteracting spin-2 particles, gravitons.
Below are answers to your questions.

For instance, is it a solution to a specific Lagrangian; if so what is the Lagrangian?

$$ S = \int d^4 x \left(\frac{1}{2} \partial^{\mu} h_{\alpha \beta} \partial_{\mu} h^{\alpha \beta} - \frac{1}{4} \partial^{\mu} h \partial_{\mu} h + \mathcal{O}(h^3) \right). $$
Here index joggling is done with the metric $\eta$ (and not $g$!); and the trace is $h = h_{\alpha \beta} \eta^{\alpha \beta}$.

How many dimensions does the rank 2 tensor has --- Does it have 4, in which case it is a rank-2 tensor of 4x4 dimensions, and not just rank-2 of nxn dimensions?

Rank-2 tensor has $d^2$ dimensions, which for $d=4$ is $16$.
Symmetric rank-2 tensor has $d(d+1)/2$ dimensions which for $d=4$ is $10$.

What equation is responsible for assigning it a spin of 2; is it the Lagrangian that enforces that, or is it merely a property of rank-2 tensors?

Spin is completely determined by the representation of the Poincare group that the field belongs to.

Does it have any requirements of the entries to the tensor, for instance must it be symmetric (like the metric tensor of general relativity), or are the entries arbitrary?

It must be symmetric.

The rank-2 tensor in 4 dimensions admits 16 free variables. Is this the case for a graviton -- all 16 free variables are admitted, no restriction on the freedom?

It must be symmetric which leaves 10 degrees of freedom.
8 degrees of freedom are fixed by gauge transformations. In GR these were diffeomorphisms which are generated by vector fields through the Lie derivative. These act infinitesimally on the linearized tensor $h$ via
$$ \delta h_{\mu \nu} = \left( \partial_{\mu} \lambda_{\nu} + \partial_{\nu} \lambda_{\mu} \right) \delta \varepsilon. $$
Like with electromagnetism, each gauge transformation takes care of 2 degrees of freedom, one is eliminated because it acts as a Lagrange multiplier to enforce the constraint, and another is eliminated by the choice of gauge.
There are 4 components of $\lambda$ (and $d$ in the general $d$-dimensional spacetime), so we're left with 2 polarizations for the gravitational wave (and $d(d+1)/2 - 2 d$ in the $d$-dimensional space-time).

Can one represent a graviton with a matrix. If so, can you provide an example of such a matrix --- if for no other reason than to fix the idea.

I'm not sure what you mean to be honest. Can you represent a photon with a matrix?

What is a graviton?

Similarly how a photon is a particle you get after quantizing free electromagnetism, a gluon is a particle you get after quantizing linearized Yang-Mills; you get a graviton after quantizing linearized gravity.
It is worth reiterating that gravitons exist as states in linearized quantum gravity which is a Wightman QFT on Minkowski space, which means they necessarily exist in the weak field limit.
In the strong field limit, it is not clear whether a graviton is a fundamental concept or not. But any theory of Quantum Gravity needs to reproduce the properties of gravitons in the weak field limit (both string theory and spinfoam LQG do so).
Finally, there's an interesting story about what happens if we leave terms up to $\mathcal{O}(h^n)$, not $\mathcal{O}(h^2)$. These can be treated as perturbations, and there will be an infinite tower of interaction vertices between gravitons.
Here we have 3 problems:

*

*The perturbative expansion for gravity is famously nonrenormalizable. This is a technical issue that prevents us from making predictions close to / beyond the Planck scale.

*Perturbative expansions generally are asymptotic expansions and don't converge. This problem exists in all QFTs. We could hope that there exists a nonperturbative completion like for Yang-Mills.

*In the strong field approximation, gravity can't be a Wightman QFT (which means that even the nonperturbative completion would be physically unsatisfactory). This basically means that Quantum Gravity is not a QFT, but something entirely different alltogether (strings? LQG?).

