- When you try 1/[1, 2, 3], MATLAB attempts to perform matrix right division. Here, it interprets the operation as solving the equation x * [1, 2, 3] = 1 for x. This requires the dimensions to be compatible for matrix multiplication, which isn't possible because a scalar (1x1) cannot multiply a row vector (1x3) to produce a scalar (1x1). Hence, you encounter a dimension mismatch error.
- When you use 1/[1; 2; 3], MATLAB interprets this as multiplying 1 by the pseudo-inverse of the column vector [1; 2; 3]. This is a valid operation because the pseudo-inverse provides a way to handle non-square matrices, resulting in a least-squares solution. In this case, it returns [0, 0, 0.3333], which satisfies the equation in a least-squares sense.