TITLE: Matrix rows notation
QUESTION [13 upvotes]: I'm working with a set of $M$ vectors $ \{\mathbf{w}_i \in \mathbb{R}^N, \, i = 1, \ldots, M \}$. Since single vectors are usually considered as column vectors, I'm defining a matrix 
$$
\mathbf{W} = [\mathbf{w}_1, \ldots, \mathbf{w}_M] \in \mathbb{R}^{N \times M}
$$
by placing the vectors as matrix columns.
However, for some descriptions, I need to refer to the matrix rows.
Is there an elegant notation to refer to this matrix rows (preferably with less notation overhead)?

REPLY [8 votes]: Since $W_{nm}$ is unambiguous for the $n$th row, $m$th col entry of $W$, I quite like the following notation of using a star, dot, or  colon as a placeholder for the other dimension (similar to how dot or star can be used as omitted entries in a matrix):

For rows: $W_{n*}$ or $W_{n,*}$ (or $W_{n\cdot}$ or $W_{n:}$)
For cols: $W_{*m}$ or $W_{*,m}$ (or other symbols likewise)

From a programming perspective, this is similar to how in R we simply leave off the other dimension, writing W[n,] and W[,m], and in Numpy we use a colon to represent the entire other axis with W[n,:] and W[m,:].