The reason for this question is related to the fact that I think something is missing when an absorpion and emission of a (intermediate) vector boson $W$ in the context of transformation of quark flavors by the Weak Interaction is always an invariant (that is, one must always have a $W$ boson to change a quark flavor)
Usually we use Feynman diagrams to draw something like that
But my interest is another: using Feynman diagrams also to represent the possibility of a 'dot product' between absorpion $X$ and emission $Y$
Usually when an up quark becomes a down quark, only the down quark remains. My approach is different: consider the quark down and the quark up as a pair of elements $(a, b)$ without looking at them as a transformation of the element $a$ into the element $b$ or vice versa without think them as a transformation of quark flavors (I want to keep the 2 elements as a pair and not return only one quark flavour after a process of transformation of quark flavors by the weak interaction)
I want to keep the 2 elements (quarks), but use the Feynman diagrams to represent a 'dot product' $X \cdot Y$ (a bilinear form) between absorpion $X$ and emission $Y$ where $X, Y$ could be considered as 2 vectors, I still can't configure what they could represent mathematically to do what I ask correctly.
In A Not-so-Characteristic Equation: the Art of Linear Algebra by Elisha Peterson, the dot product, cross product, and many other linear algebraic operations are described in terms of diagrams. There are also many good references in the paper for further exploration.
I find also this link How can I learn about doing linear algebra with trace diagrams?