I don't know how important this is in terms of pure mathematics, but I want to introduce this concept since it is useful in some cases.
When a matrix is multiplicated with a vector as shown in the following way, the non-zero item in the multiplication function as a tool that is selecting a specific column from the matrix. It can be proved easily just by calculating the inner product of the matrix and vector by hands. If you interpret the vector as a column selector, you can easily figure out the multiplication of a matrix and vector in this form without going through the complicated process of inner product.
The same idea works from the other side of the matrix. A vector placed on the left selects a row instead of a column, and the two together pick out a single element or a submatrix. This page covers the column case first, works through three 4x4 examples, and then turns the idea around for rows.
- How does a column selection vector pick one column ?
- What do the three 4x4 examples show ?
- How does a row selection vector pick one row ?
- Where do selection vectors show up in practice ?
How does a column selection vector pick one column ?
Let's set up the general case before the numbers. A matrix A has n columns, c1 to cn, and it is multiplied by a vector with a single 1 in position i and zeros everywhere else. This vector is usually written ei, and it is simply the i-th column of the n x n identity matrix. The question is why the product returns column i and nothing else.
The answer comes from reading the product by columns instead of by rows. For any vector x, the product Ax is a weighted sum of the columns of A: Ax = x1c1 + x2c2 + ... + xncn. Each element of x is the weight of one column. When x = ei, every weight is 0 except xi = 1, so only ci survives.
Figure 1 draws the matrix as a row of column blocks, c1, c2, ..., ci, ..., cn, and the selector as a column of zeros with one 1. Arrows mark the i-th column of the matrix, the i-th element of the vector, and the single column that appears on the right of the equals sign.

Figure 1. A vector with a single 1 in position i returns column i of the matrix, and every other column is multiplied by 0.
- The position of the 1 in the vector decides which column comes out, and the values in the other positions contribute nothing.
- The vector must have n elements, one per column of A, or the product is not defined.
- The result has as many rows as A, because it is one whole column of A.
You can clearly understand how this column selection vector works just by trying a few examples as below.
Aei is the i-th column of A : you can write the result down without doing any multiplication.Read Ax as a weighted sum of columns : the selection vector is the special case where one weight is 1 and the rest are 0.ei is a column of the identity matrix : this is why AI = A, since each column of I selects the matching column of A.
What do the three 4x4 examples show ?
The three examples below use the same 4x4 matrix, with elements a11 to a44, and change only what multiplies it. The first uses one 1, the second uses two 1s in one vector, and the third uses two vectors side by side. So you can see what each change does to the result.
Example 1
In this example, a 4x4 matrix is multiplied by a 4x1 vector. The third element in the vector is set to 1 and all other elements are zero. The result of this operation is a vector which is made up of the third column of the matrix.
Figure 2 writes out every row of the product. Each row is 0 x ai1 + 0 x ai2 + 1 x ai3 + 0 x ai4, so each row keeps only its ai3 term. The labels mark the 3rd element of the vector and the 3rd column that comes out.

Figure 2. Example 1 - a 1 in the 3rd element keeps only the ai3 term in each row, so the result is the 3rd column.
Example 2
In this example, a 4x4 matrix is multiplied by a 4x1 vector. In this case, two elements (2nd and 4th) in the vector are set to 1 and all other elements are zero. The result of this operation is a vector which is made up of the linear combination (sum) of the selected columns (2nd and 4th column) of the matrix.
Figure 3 follows the same steps, and now two terms survive in every row. The row-by-row expansion in the middle, 1 x ai2 + 1 x ai4, is the correct result.

Figure 3. Example 2 - 1s in the 2nd and 4th elements add the 2nd and 4th columns into one vector.
Read the last vector in Figure 3 with care. Its first two rows, a12 + a14 and a22 + a24, are correct. Its third and fourth rows print a22 + a34 and a22 + a44, and these are typos. Each row keeps its own row index, so the correct rows are a32 + a34 and a42 + a44, as the step just before it shows.
Example 3
In this example, a 4x4 matrix is multiplied by the 4x2 matrix. You can think of the 4x2 matrix as a concatenation of the 2 selection vector (column selection vector). In this example, the 2nd element of the first column and 4th element of the second column in the 4x2 matrix are set to 1. In this case, two columns from the matrix are selected. The first selected column is the 2nd column of the matrix and the second selected column is the 4th column of the matrix.
Figure 4 multiplies the 4x4 matrix by the 4x2 selector and expands both result columns. The left column of the product keeps the ai2 terms, and the right column keeps the ai4 terms.

Figure 4. Example 3 - two selection vectors side by side return the 2nd and 4th columns as separate columns.
One 1 in the vector selects one column : Example 1 returns column 3 unchanged.Several 1s in one vector add columns together : Example 2 returns column 2 plus column 4, which is a single vector and not two columns.Several selection vectors side by side keep the columns apart : Example 3 returns a 4x2 matrix that holds column 2 and column 4 as separate columns.Other weights give other combinations : replace a 1 by 2 or -1, and the matching column is scaled by that number before the sum.
How does a row selection vector pick one row ?
Now let's turn the idea around. A column selector sits on the right of A, so a row selector must sit on the left. It is a row vector, eiT, with a single 1 in position i. The product eiTA returns row i of A as a row vector.
You can derive this from the column case with one transpose. Row i of A is column i of AT, and ATei selects exactly that column. Taking the transpose of both sides gives (ATei)T = eiTA, which is row i written as a row.
Let's check it with numbers. Take the 4x4 matrix A with rows (1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12) and (13, 14, 15, 16). The row vector e3T = (0, 0, 1, 0) gives e3TA = (9, 10, 11, 12), which is row 3. For comparison, the column vector e3 gives Ae3 = (3, 7, 11, 15)T, which is column 3.
Stacking row selectors works like the side-by-side column selectors of Example 3. The 2x4 matrix S with rows e2T and e4T gives SA with rows (5, 6, 7, 8) and (13, 14, 15, 16), which are rows 2 and 4. Notice that S is exactly the transpose of the 4x2 selector used in Example 3.
When you use both sides at once, you select rows and columns together. The product eiTAej is a single number, the element aij. For the matrix above, e3TAe2 = 10. In the same way, SAST keeps rows 2 and 4 and columns 2 and 4, and for this matrix it gives the 2x2 submatrix with rows (6, 8) and (14, 16).
A row selector multiplies from the left : eiTA is row i of A, and Aei is column i.The transpose links the two cases : eiTA = (ATei)T, so everything shown for columns carries over to rows.Selectors on both sides pick out elements : eiTAej = aij, and SAST gives a submatrix.
Where do selection vectors show up in practice ?
In a real program, you do not multiply by ei just to read one column. Indexing is cheaper, and in Matlab A(:,3) and A(3,:) do the job directly. The value of the selection vector is in derivations, where writing a selection as a matrix product lets you use ordinary matrix algebra on it.
The first use is the general weighted sum. With w = (0, 2, 0, -1)T and the 4x4 matrix of the previous section, Aw = 2c2 - c4 = (0, 4, 8, 12)T. The selection vector is the simplest member of this family, and the same reading of Ax explains all of them.
The second use is the permutation matrix. If you place the columns of the identity matrix in a new order, you get a matrix P whose columns are all selection vectors. Then AP reorders the columns of A, and PA reorders the rows. For example, P = [e2 e1 e4 e3] swaps columns 1 and 2 and columns 3 and 4. Because PTP = I, you undo the reordering with PT.
The third use comes from MIMO. The channel matrix H has one row per receive antenna and one column per transmit antenna. So if the transmitter uses only antennas 2 and 4, the effective channel is H multiplied by the 4x2 selector of Example 3. Written this way, antenna selection becomes a choice of selection matrix, and you can compare the candidates with the usual matrix tools.
Use indexing in code and selection vectors in derivations : A(:,j) and Aej give the same numbers, but only the product form fits into matrix algebra.A permutation matrix is a set of selection vectors : AP reorders columns, PA reorders rows, and PT undoes the reordering.Antenna selection is column selection : keeping a subset of transmit antennas keeps the matching columns of H.