Question:

If the service begins with eleven men, and two leave the room for some unknown reason, is there still a minyan?

Answer:

If there are not ten men in the room, there is no minyan. Nevertheless, whatever was begun while ten men were in the room can be concluded—provided that at least six men (a majority of the minyan) remain.

However, to figure out which sections of the prayers constitute a singular unit, and as such can be concluded even if the minyan has been depleted, is tricky, and there are varying customs in different communities. Here are some rules following the rulings of Rabbi Schneur Zalman of Liadi:

  • If the one leading the services begins the repetition of the amidah in the presence of a minyan, and then a person or persons walks out, leaving less than ten men present, the leader may finish the repetition, and may even recite the full kaddish that follows (as it is considered an extension of the amidah).
    In most other instances, kaddish can not be said unless ten men were present when the kaddish began.
  • On a holiday, the kohanim cannot bless the congregation unless a minyan is present when they begin reciting the blessing.
  • If kaddish was begun in the presence of a minyan, it may be concluded even if the quorum is depleted. However, the barchu that sometimes follows kaddish may not be said.
  • If the first aliyah blessing was begun, the entire Torah reading may be concluded, and the blessings recited. The haftorah, however, is considered a separate unit, and its blessings cannot be recited if there is no minyan present when it is begun.
  • During the evening prayer, if the minyan was depleted during the Shema or its blessings, the kaddish that follows it may be said. The kaddish that follows the amidah can be said if there was a minyan present when the amidah was begun.

I should also point out that if there are only ten men present, for anyone to leave is forbidden since doing so causes the Divine presence, which manifests itself amongst the minyan, to depart prematurely.


Sources:
Shulchan Aruch Harav Orech Chaim 55; Mishnah Berurah ibid. 143.