Error, a row and column Vector cannot be added together
Description
Examples
See Also
This error occurs when you try to add or subtract two Vectors that do not have the same dimensions.
To fix this, transpose one of both of the Vectors so that they are both the same dimension.
In this example we try to add (or subtract) two Vectors.
W≔5|6
W≔56
X≔7,8
X≔78
W+X
The same error occurs when subtracting:
W−X
The error occurs because W is a row Vector and X is a column Vector:
whattypeW
Vectorrow
whattypeX
Vectorcolumn
Solution:
Use LinearAlgebra[Transpose] to convert one Vector to the other Vector's type:
W+LinearAlgebraTransposeX
1214
Alternatively, you can use one of the short forms for Transpose (^+ or ^%T):
W+X+
W+X%T
For users of Maple 17 and earlier versions: These examples resulted in a different error message. The solutions are the same. For example, the example given above resulted in:
Error, (in rtable/Sum) invalid arguments
LinearAlgebra[Transpose], Vector
Download Help Document