[Tex/LaTex] How align the qedsymbol after of a big formula in display mode

amsthmvertical alignment

Description of the problem

My problem is this. For the proof of a math theorem i use the proof environment of the package amsthm. It adds a \qedsymbol in the last line of the proof, but if the proof ends with a displayed formula the qedsymbol appears in the next line leaving an unwanted blank space.

The documentation of amsthm teaches to fix this problem placing the command \qedhere after of the displayed formula but inside of the appropriate environment.

This works well if the formula is of one line like

\[ax^2+bx+c=0.\qedhere
\]

but if the proof ends in a matrix, or cases with a "great height" the qedsymbol is fixed in the baseline at right and it this looks higher than expected (for my taste).

The result is showed in this

MWE

\documentclass{article}
\usepackage[width=7cm]{geometry} % Only for reducing space in this MWE 
\usepackage{amsmath} % For `bmatrix`
\usepackage{amsthm} % For `proof` environment
\begin{document}
\begin{proof}
And this proof ends with
\[
\begin{bmatrix}
    1 & 0 \\
    0 & 1 \\
    0 & 0
\end{bmatrix}.\qedhere
\]
\end{proof}
\noindent Text
\end{document}

that produces

enter image description here

What I want

I'd like something like

enter image description here

with the qedsymbol aligned with the bottom of the matrix. Is this possible?

Best Answer

As Enrico already mentioned, I wouldn't use a stop after the matrix. However, you can use the \tag amcro from amsmath:

\documentclass{article}
\usepackage[width=7cm]{geometry} % Only for reducing space in this MWE 
\usepackage{amsmath} % For `bmatrix`
\usepackage{amsthm} % For `proof` environment
\begin{document}
\begin{proof}
And this proof ends with
\begin{align*}
\begin{bmatrix}
    1 & 0 \\
    0 & 1 \\
    0 & 0
\end{bmatrix}\\[-\normalbaselineskip]\tag*{\qedhere}
\end{align*}
\end{proof}
\noindent Text
\end{document}

enter image description here