TITLE: Is there a mathematical representation/formalism of/for Feynman Diagrams?
QUESTION [7 upvotes]: Is there a mathematical formalism to represent or generalize Feynman Diagram? 
Has anyone tried to use knot theory, Graph theory or other abstract algebra tools to generalize/formalize Feynman's notions?

REPLY [2 votes]: Mathematically a Feynman diagram is just a picture that encodes a contraction of tensors.
Take a vector space $V$ and let $V^{\ast}$ be its dual. Take, e.g., a tensor 
$$
A\in V\otimes V^{\ast}\otimes V\otimes V
$$
and
$$
B\in V\otimes V\otimes V\otimes V\otimes V^{\ast}\ .
$$
Then you can form a tensor
$$
A\circ B\in V\otimes V\otimes V\otimes V\otimes V
$$
by contracting (using the duality pairing) the 2nd component of $A$ with the 3rd component of $B$ and 3rd component of $A$ with the 5th component of $B$. Clearly, one can play this game with more than two elementary pieces. The only way to keep track of such more complicated contractions is via a picture, namely, a Feynman diagram.
In some situations one not just dealing with one picture but with a generating function involving an infinite sum over such pictures with precise combinatorial weights (or symmetry factors). The way to do this with mathematical precision is via Joyal's theory of combinatorial species. You can see how to do this on some examples that contain the germ of generality in this article.