Right Division
This type of division is different from Right Matrix Division in that the division is performed on each pair of corresponding elements.
Each index of the first matrix is divided by the same index of the second matrix, with the quotient, and put into a new matrix in the same position. Only matrices with the same dimensions can be multiplied this way.
./ | Scalar | Row Vector | Column Vector | Matrix |
---|---|---|---|---|
Scalar | Divides the first scalar by the second scalar. | Divides the scalar by each element of the row vector. Produces a vector the same size as the row vector. | Divides the scalar by each element of the column vector Produces a vector the same size as the column vector. | Divides the scalar by each element of the matrix. Produces a vector the same size as the matrix. |
Row Vector | Divides each element in the row vector by the scalar. The resulting vector is the same size as the original vector. | Requires the vectors to be the same size. Divides each entity of the first vector by the corresponding entity of the second vector. The resulting vector is the same size as the original vectors. | Each row/column vector is implicitly replicated until the two arguments have the same dimensions. Regular right division is then performed. | The row vector is implicitly replicated until the two arguments have the same number of rows. Regular right division is then performed. |
Column Vector | Divides each element in the column vector by the scalar. The resulting vector is the same size as the original vector. | Each row/column vector is implicitly replicated until the two arguments have the same dimensions. Regular right division is then performed. | Requires the vectors to be the same size. Divides each entity of the first vector by the corresponding entity of the second vector. The resulting vector is the same size as the original vectors. | The column vector is implicitly replicated until the two arguments have the same number of columns. Regular right division is then performed. |
Matrix | Divides each element in the matrix by the scalar. The resulting vector is the same size as the original matrix. | The row vector is implicitly replicated until the two arguments have the same number of rows. Regular right division is then performed. | The column vector is implicitly replicated until the two arguments have the same number of columns. Regular right division is then performed. | Requires the matrices to be the same size. Divides each entity of the first matrix by the corresponding entity of the second matrix. The resulting matrix is the same size as the original matrices. |
Examples
3 ./ 4
ans = 0.75
7 ./ [6; 2; 2]
ans = [1.1667; 3.5; 3.5]
[5 4 3] ./ [4 6 3]
ans = [1.25 0.6667 1]
[6; 4; 2] ./ [6 8 5; 3 9 2]
Comments
The implicit replication of a vector to fill other dimensions is a generalization of operating on a scalar/vector pair. This capability is not yet available for multidimensional and sparse matrices.