How can a physicist understand a **2-dimensional topological field theory** as a **Frobenius algebra**? Are there some explicit examples in order to understand this relation?


The definition (e.g. on Wikipedia) of the Frobenius algebra is quite clear, it is a finite dimensional associative algebra equipped with a special non-degenerate bilinear form. If this algebra is represented by $n\times n$ matrices then the bilinear form is the trace.


Now, I fail to see how this is a TFT. 


In specific two very famous topological field theories in 2-dimensions (that physicists work with a lot) are the topological A-model and the topological B-model (a la Witten). These models are related via mirror symmetry. How are they defined as a Frobenius algebra and what are their differences as a Frobenius algebra? And natural question to ask is wether mirror symmetry in the TFT side relates *somehow* the two Frobenius algebras on the algebra side.


So I would like to understand intuitively why a Frobenius algebra and a TFT are the same thing and the detail I ask in specific about the A-model and the B-model which are of my main interest.



Why is a Topological Field Theory equivalent to a Frobenius algebra?
As the general relation between 2d TQFT and Frobenius algebras has already been given in another answer, let me describe the Frobenius algebras occurring in the A and B-models.


1) The A-model is defined for a compact symplectic manifold $(X,\omega)$. The vector space underlying the Frobenius algebra is the cohomology $H^{\*}(X,\mathbb{C})$. The products of the Frobenius algebra is the quantum product, a deformation of the usual cup-product by counts of pseudo-holomorphic spheres (strictly speaking, the usual definition of the quantum product involves formal power series. These power series are expected to converge for $\omega$ big enough and the case of general $\omega$ should be defined by analytic continuation).The bilinear form is the usual intersection pairing on cohomology, which is non-degenerate by Poincaré duality. Remark that if $X$ is Kähler then we have a Hodge decomposition $H^i(X,\mathbb{C})=\bigoplus\_{p,q, p+q=i} H^p(X,\Omega\_X^q)$.


(EDIT: here is an explicit description of the quantum product. Let $a$, $b \in H^\bullet(X,\mathbb{C})$. We want to define their product $a \* b$. Because the intersection pairing (,) is non-degenerate, it is enough to know the number $(a\*b,c)$ for every $c$. The formula is 


$(a\*b,c)=\sum\_{\beta \in H\_2(X,\mathbb{Z})} N\_{abc,\beta} e^{-\int\_\beta \omega}$


where $N\_{abc,\beta}$ is intuitively the number of holomorphic spheres in $X$ of class $\beta$ intersecting given submanifolds Poincaré duals to $a$,$b$,$c$. The precise definition of this number (rational in general) is the subject of Gromov-Witten theory)).


2) The B-model is defined for a compact complex manifold $Y$, of complex dimension $n$. The vector space underlying the Frobenius algebra is the space $HH^\bullet(Y)$ defined by $HH^i(Y)= \bigoplus\_{p+q=i} H^p(Y,\wedge^q T\_Y)$ where $T\_Y$ is the holomorphic tangent space to $Y$.The product comes from the natural product of bivector fields. The bilinear form pairs non-trivially $H^p(Y, \wedge^q T\_Y)$ and $H^{n-p}(Y, \wedge^{n-q} T\_Y)$ and is defined using the Calabi-Yau condition: we have $H^p(Y, \wedge^q T\_Y)=H^p(Y,\Omega\_Y^{n-q})$
and $H^{n-p}(Y, \wedge^{n-q} T\_Y)=H^{n-p}(Y, \Omega\_Y^q)$ and then we use the standard integration pairing (or Serre duality depending on the language you prefer). 


If $(X,\omega)$ and $Y$ are mirror, the corresponding Frobenius algebras structures are isomorphic. For example, we have $H^p(X,\Omega\_X^{n-q})=H^p(Y,\Omega\_Y^q)$, which at the level of dimensions is the usual mirror symmetry relation for Hodge numbers. But the identification of Frobenius algebras on both sides contains much more information and is crucial in the concrete application of mirror symmetry. For example, saying that the product on the two sides are the same will relate the quantum product of X, defined in terms of counts of holomorphic curves, to the some product defined uniquely in terms of the complex structure of Y. 


As mentionned in the comments to the question, it is often useful to think in terms of extended TQFT, which in physical terms means to take into account topological boundary conditions/branes. These topological boundary conditions naturally form a Calabi-Yau (dg/$A\_\infty$) category and one recovers the Frobenius algebra from the Hochschild cohomology/homology of this category. For the A-model, the category is the Fukaya category and for the B-model, the category is the derived category of coherent sheaves. Mirror symmetry makes sense at this extended level (it is the "homological version" of mirror symmetry proposed by Kontsevich). 


