Weight Matrix in LaTeX (\mathbf{W})
- LaTeX command
\mathbf{W}- Package
- No package needed: built into LaTeX
- Mode
- Math mode only
Where it is used
Bold upright W, the conventional notation for a weight matrix in a neural network layer.
Bold capitals denote matrices and bold lowercase letters denote vectors, so a dense layer is \mathbf{y} = \mathbf{W}\mathbf{x} + \mathbf{b}, with layer-specific weights written \mathbf{W}^{(l)} or \mathbf{W}_l. \mathbf produces upright bold Latin letters; it does not bold Greek letters or most symbols, so use \boldsymbol or \bm for \boldsymbol{\Sigma} or a bold \theta. Many deep learning papers drop the bold entirely and write W; choose one convention and keep it throughout. The transpose is usually \mathbf{W}^\top, which reads more cleanly than ^T.
Minimal compilable example
Paste this into an empty .tex file and compile it with pdfLaTeX, XeLaTeX or LuaLaTeX.
\documentclass{article}
\begin{document}
Weight Matrix: $\mathbf{W}$
\[ \mathbf{h}_{l+1} = \sigma(\mathbf{W}_l \mathbf{h}_l + \mathbf{b}_l) \]
\end{document}Related symbols
All 머신러닝 및 AI →Frequently asked questions
- How do I write Weight Matrix in LaTeX?
- Type \mathbf{W} in math mode, for example $\mathbf{h}_{l+1} = \sigma(\mathbf{W}_l \mathbf{h}_l + \mathbf{b}_l)$. It works in plain LaTeX without loading any package.
- Which package do I need for \mathbf{W}?
- None. \mathbf{W} is part of standard LaTeX, so it compiles with nothing in the preamble but the document class.
- Can I use \mathbf{W} in text mode, or only in math mode?
- Only in math mode. Outside $...$ LaTeX stops with "Missing $ inserted", so write $\mathbf{W}$ in running text.
최고의 AI LaTeX 편집기, Overleaf 대안
Octree는 15개 이상의 대학의 연구자들이 AI를 사용하여 논문을 더 빠르게 작성하도록 도움
- AI로 아름다운 TikZ 다이어그램 생성
- 이미지를 업로드하고 LaTeX로 원활하게 변환
- 논문 작성 및 서식에 대한 즉각적인 지원 받기