# Left Division

This type of division is different from Left Matrix Division in that the division is performed on each pair of corresponding elements.

Each index of the second matrix is divided by the same index of the first matrix, with the quotient 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 second scalar by the first scalar. | Divides the scalar from each element in the row vector. The resulting vector is the same size as the original vector. | Divides the scalar from each element in the column vector. The resulting vector is the same size as the original vector. | Divides the scalar from each element in the matrix. The resulting vector is the same size as the original matrix. |

Row Vector | Divides each element of the row vector from the scalar. Produces a vector the same size as the row vector. | Requires the vectors to be the same size. Divides each entity of the first vector from 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 left division is then performed. | The row vector is implicitly replicated until the two arguments have the same number of rows. Regular left division is then performed. |

Column Vector | Divides each element of the column vector from the scalar. Produces a vector the same size as the column vector. | Each row/column vector is implicitly replicated until the two arguments have the same dimensions. Regular left division is then performed. | Requires the vectors to be the same size. Divides each entity of the first vector from 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 left division is then performed. |

Matrix | Divides each element of the matrix from the scalar. Produces a vector the same size as the matrix. | The row vector is implicitly replicated until the two arguments have the same number of rows. Regular left division is then performed. | The column vector is implicitly replicated until the two arguments have the same number of columns. Regular left division is then performed. | Requires the matrices to be the same size. Divides each entity of the first matrix from the corresponding entity of the second matrix. The resulting matrix is the same size as the original matrices. |

## Examples

```
4 .\ 6
ans = 1.5
[6 3 2] .\ 6
ans = [1 2 3]
[5 4 3] .\ [4 6 3]
ans = [0.8 1.5 1]
```

Invalid examples:

`[6 3 2] .\ [6; 8; 3]`

## 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.