I'm trying to write some math formulas into a matrix and the output coming up not as I expected. Parts of the formulas had their font size changed to match the smaller terms. I need a way to make each matrix element fit its contents as a usual equation would do.
Thanks!
Code: Select all
\begin{equation}
\begin{bmatrix}
U_2 & U_3 & U_4 \\
\frac{U_2 U_2}{U_1}+P & \frac{U_2 U_3}{U_1} & \frac{U_2 U_4}{U_1} \\
\frac{U_3 U_2}{U_1} & \frac{U_3 U_3}{U_1}+P & \frac{U_3 U_4}{U_1} \\
\frac{U_4 U_2}{U_1} & \frac{U_4 U_3}{U_1} & \frac{U_4 U_4}{U_1}+P \\
\frac{U_2}{U_1} \left(U_5+P\right) &
\frac{U_3}{U_1} \left(U_5+P\right) &
\frac{U_4}{U_1} \left(U_5+P\right)
\end{bmatrix}
\end{equation}