A maximum matching is a Matching of maximum cardinality, that is, a matching such that for any matching , we have .
Converting to a Maximum Flow Problem.
This can be done by defining the corresponding Flow Network for the bipartite graph .
This can be done by letting the source and sink be new vertices not in , and we let .
If the vertex partition of is , the directed edges of are the edges of , directed from to , along with new directed edges defined by
Finally we assign unit capacity to each edge in .
Examples
A matching with cardinality 2

A maximum matching with cardinality 3

The bipartite graph converted to a flow network
The shades edges have a flow of 1 and the other edges have no flow. This graph
has been solved as a Maximum Flow Problem and have the same solution as the
maximum matching above.