Questions askedCategory: 2568How to Write a Matrix and System of Linear Equation in LaTex?
Yu Staff asked 1 year ago

As the title says,

I want to know how to write a matrix and system of linear equation in Latex?


1 Answers
Yu Staff answered 1 year ago

If you are looking for Latex codes for matrices, system of equations, etc, then please go to the page Latex and MathJax in WordPress.

To get $\begin{bmatrix}
1 & 2\\
3& 4
\end{bmatrix}$, write


$\begin{bmatrix}
  1 & 2\\
  3& 4
\end{bmatrix}$.

 
For an augmented matrix, try

 \[
 \left[\begin{array}{rrr|r}
  1 & 0 & 0 & 1  \\
   0 & 1 & 0 & 0  \\
   0 & 0 & 1 & 0  \\ 
   \end{array} \right]
\]

You get
\[
\left[\begin{array}{rrr|r}
1 & 0 & 0 & 1 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
\end{array} \right] \]  
By writing

 \[
 \left[\begin{array}{rrr|rrr}
  1 & 0 & 0 & 1 &1 & 1 \\
   0 & 1 & 0 & 0 & 1 & 1 \\
   0 & 0 & 1 & 0 & 0 & 1 \\ 
   \end{array} \right]
\]

You get
\[ \left[\begin{array}{rrr|rrr}
1 & 0 & 0 & 1 &1 & 1 \\
0 & 1 & 0 & 0 & 1 & 1 \\
0 & 0 & 1 & 0 & 0 & 1 \\
\end{array} \right]\] Here is the Latex code for the system of equations.


\[
\left\{ 
\begin{array}{c}
a_1x+b_1y+c_1z=d_1 \\ 
a_2x+b_2y+c_2z=d_2 \\ 
a_3x+b_3y+c_3z=d_3
\end{array}
\right. 
\]

The result is
\[
\left\{
\begin{array}{c}
a_1x+b_1y+c_1z=d_1 \\
a_2x+b_2y+c_2z=d_2 \\
a_3x+b_3y+c_3z=d_3
\end{array}
\right.
\] More latex codes can be found at the page MathJax in WordPress, especially latex codes useful for MathJax blogs.