I want to have multiple matrices side by side to present spectral decomposition in R markdown, but it doesn't seem to work. Please help
$$
\left(\begin{array}
0.8944272 & 0.4472136\\
-0.4472136 & -0.8944272
\end{array}\right\)
\left(\begin{array}
10 & 0\\
0 & 5
\end{array}\right)
$$
Three minor corrections should be sufficient to make this work for both, HTML and PDF output:
\right\)
array
environment, e.g., with \begin{array}{cc}
-
$$
\left(\begin{array}{cc}
0.8944272 & 0.4472136\\
-0.4472136 & -0.8944272
\end{array}\right)
\left(\begin{array}{cc}
10 & 0\\
0 & 5
\end{array}\right)
$$
You can also use the *matrix
environments of amsmath
$$
\begin{pmatrix}
0.8944272 & 0.4472136\\
-0.4472136 & -0.8944272
\end{pmatrix}
\begin{pmatrix}
10 & 0\\
0 & 5
\end{pmatrix}
$$
amsmath is supported by Pandoc and MathJax, the tools that are commonly used when converting RMarkdown to HTML or PDF.
You can also do this to get brackets instead of parentheses
$\left[\begin{array}{ccc}
10 & 0\\
0 & 5
\end{array}\right]$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With