Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I represent a matrix in Github markdown?

I am trying to represent a basic vector, the following code works in Visual Studio Code.

I am using the following line $\begin{bmatrix}X\\Y\end{bmatrix}$

All whitespace removed. It should look like this,

enter image description here

However, when pushed to Github it does not render correctly and instead just renders to entire text letter for letter like it is unsupported. Does anybody know how to get get the following vector to display correctly?

like image 912
Joe Avatar asked Feb 14 '26 03:02

Joe


1 Answers

just replace \\ with \\\

\vec{v} = \begin{bmatrix} X \\\ Y \end{bmatrix}

like image 103
Lei Wang Avatar answered Feb 21 '26 12:02

Lei Wang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!