In matlab, \ is left division, and / is right division.
- If it is a number calculation, the left division and right division are equivalent, for example, 3/2 = 2\3.
- For matrix operations, the two are not equivalent. Matrix division is defined in matlab as matrix multiplication after inversion. For example, the inverse matrix of A is A1, then B/A = B A1, A\B = A1 B. Matrix multiplication does not satisfy the commutative law, so there needs to be left and right division. The command for matrix inversion is inv, that is, A1 = inv(A).