The following matrix equation looks great:
\begin{align*}
\overset{A}{\left[\begin{matrix}t_{1}&1\\
\vdots&\vdots\\
t_{n}&1
\end{matrix}\right]}
\overset{x}{\left[\begin{matrix}
x_{1}\\x_{2}
\end{matrix}\right]}
&=
\overset{b}{\left[\begin{matrix}
b_{1}\\ \vdots \\ b_{n}
\end{matrix}\right]}
\end{align*}
Except I am accustomed to having the tops of my matrices aligned when I write on scratch paper. How can I accomplish this in LaTeX?
Best Answer
A note before,
amsmath
provides special*matrix
environments:pmatrix
for( · )
bmatrix
for[ · ]
Bmatrix
for{ · }
vmatrix
for| · |
Vmatrix
for|| · ||
Solution 1
I used the
\vphantom
macro that resizes the box inside the\overset
to same height like the other parts.Code
Output
Solution 2
As the second row in the bigger matrices are not of the same height of
x_2
the\vphantom
command is used again (try it without to see the effect or replace\vdots
with “normal” math stuff likex_0
).Code
Output