General ⇒ How do I make a matrix(4x4) with a square bracket
How do I make a matrix(4x4) with a square bracket
- Attachments
-
- matrix(4x4)
- matrix.JPG (12.32 KiB) Viewed 46690 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How do I make a matrix(4x4) with a square bracket
[1] Bracket - Wikipedia, the free encyclopedia
Best regards
Thorsten¹
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
How do I make a matrix(4x4) with a square bracket
Code: Select all
$\left[\begin{array}{cccc}
w1 & w2 & w3 & w4 \\
x1 & x2 & x3 & x4 \\
y1 & y2 & y3 & y4 \\
z1 & z2 & z3 & z4
\end{array}\right]$
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How do I make a matrix(4x4) with a square bracket
The amsmath package offers the much easier way with the bmatrix and the pmatrix environment.FrankZA wrote:Easy. [...] You can choose your bracket type by simply changing the symbol after the \left and \right commands.
Code: Select all
\[
\begin{bmatrix}
a_{11} & a_{12} & a_{13} & a_{14} \\
a_{21} & a_{22} & a_{23} & a_{24} \\
a_{31} & a_{32} & a_{33} & a_{34} \\
a_{41} & a_{42} & a_{43} & a_{44}
\end{bmatrix}
\]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
How do I make a matrix(4x4) with a square bracket
Code: Select all
$\left|x\right| = \left\{\begin{array}{cl}
x & \textrm{if}\ x \geq 0\\
-x & \textrm{if}\ x < 0
\end{array}\right.$
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
How do I make a matrix(4x4) with a square bracket
For this issue the (preferably to use) amsmath package offers the cases environment.FrankZA wrote:Using the \left and \right commands allows you to choose different "boundaries". For example when creating a conditional equation: [...] But I suppose that is a completely different problem.
Code: Select all
\[
y=
\begin{cases}
x & \text{if}\quad y \geq 0 \\
-x & \text{if}\quad y < 0
\end{cases}
\]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10