HP Forums

Full Version: Row vector (multiplication by a column vector)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Example: 3x1 column vector multiplying a 1x3 row vector


a*b => "dotvecteur Error: Invalid dimension"

However, by converting b to a 1x3 matrix first, works.
b:=TRN(TRN(b)); // Converts the 1x3 vector to a 1x3 matrix ...

a*b => [[4,5,6],[8,10,12],[12,15,18]]

Requiring conversion from a row vector to a 1x3 matrix data type is an extra step that could benefit from software improvement, in cases such as these.
When I took my first linear algebra course, I was taught that vectors are simply special cases of matrices (1×n or n×1, rather than m×n).
On the other hand, if you handle this case without error, it will be harder to detect a real error...
Reference URL's