Sahih al-Bukhari Book 68, Hadith 15
A man divorced his wife and she married another man who proved to be impotent and divorced her.
She could not get her satisfaction from him, and after a while he divorced her. Then she came to the
Prophet and said, "O Allah's Messenger (ﷺ)! My first husband divorced me and then I married another man
who entered upon me to consummate his marriage but he proved to be impotent and did not approach
me except once during which he benefited nothing from me. Can I remarry my first husband in this
case?" Allah's Messenger (ﷺ) said, "It is unlawful to marry your first husband till the other husband
consummates his marriage with you."
When Ibn 'Umar was asked about person who had given three divorces, he said, "Would that you gave one or two divorces, for the Prophet (ﷺ) ordered me to do so. If you give three divorces then she cannot be lawful for you until she has married another husband (and is divorced by him)."
that he heard Ibn `Abbas saying, "If a man makes his wife unlawful for him, it does not mean that she is divorced." He added, "Indeed in the Messenger of Allah , you have a good example to follow."