# How do I write vectors and matrices in $\mathrm{\LaTeX}$?

You can of course just googling on Latex Matrix.That works wonders.

But to cater to the somewhat diaper minded fellow man a small number of examples.
I will display them in text form first, and then how it looks:

\\beginbmatrix… \\endbmatrix-brackets-Pairs theses brackets (…)

[math\n  \\beginpmatrix\n    1 & 2 \\\\\n    3 & 3 \ n  \\endpmatrix\n [/math\n

[Math\\start Pmatrix 1 & 2 \ \ \ \ 3 & 3 \ \ End Pmatrix [/math

As you can see, you separate the columns with the character & and the rows with a double backslash \ \ \ \.
In addition to the command \\beginbmatrix there are also alternatives.These only provide a different view:

\\beginBmatrix… \\endBmatrix-Curly Braces-curly brackets …

[Math\\start Bmatrix 1 & 2 \ \ \ \ 3 & 3 \\endBmatrix [/math

\\beginbmatrix… \\end Bmatrix-‘ straight ‘ brackets-brackets […

[Math\\start Bmatrix 1 & 2 \ \ \ \ 3 & 3 \\endbmatrix [/math

\\beginvmatrix… \\endvmatrix-determinant-vertical bar brackets |… |

[Math\\begin Vmatrix 1 & 2 \ \ \ \ 3 & 3 \\endvmatrix [/math

\\beginVmatrix… \\endVmatrix-Standard-double vertical bar | | … | |

[Math\\begin Vmatrix 1 & 2 \ \ \ \ 3 & 3 \\endVmatrix [/math

You can also design matrices with the command at your own discretion:

\\beginarray…\\endarray

You will get just as with:

\\beginmatrix…\\endmatrix

No brackets, but can add them manually, for example:

[math\n\\left\\ \ n \\beginarrayc c c \n   1 & 2 & 3 \ \ \ \ n   4 & 7 & 8 \ n \\endarray\n\\right\n [/math\n

[math\\left\\ \\beginarrayc c c 1 & 2 & 3 \ \ \ 4 & 7 & 8 \\endarray \\right [/math

Because the character is used to treat a group of characters similar to the same as in 2 ^ 10 =[math2 ^ 10 [/math There is an extra backslash for if you want to display the character in line 2. This is called a string-literal and you can recognize it if you already have some experience with programming.

If you do not want to use a closing parenthesis:

\\right.\n

The following is very useful if, for example, you want to explain how to wipe a matrix.
You can then specify how you want to display the columns, see addition in line 3:

[Math\n\\left (\n \\beginarrayc c  \n   \\mathbf1 & 2 & 3 \ \ \ \ n   4 & 7 & 8 \ n \\endarray\n\\right) \n [/math\n

The addition c means that the columns are centered and a vertical stripe is shown between column 2 and 3.
We swipe with the top left element and emphasize this by displaying this bold with \\mathbf1. If you want to align left or right you can too.

[Math\\left (\\beginarrayc C \\mathbf1 & 2 & 3 \ \ \ 4 & 7 & 8 \\endarray\\right) [/math

If you see nicely formatted text and want to know how to do it yourself, you can also click on the three dots in the bottom right corner of the given answer… and choose edits proposals.You’ll see how latex is used.

This seems to me first enough…