cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

MathCAD and Dot Products

Tunnelvizn
1-Newbie

MathCAD and Dot Products

Good Day,

I am a longtime MathCAD user, but I am having difficulty with a relatively simple issue - dot products . Right now I am using MathCAD 14&15 . I have MathCAD 11 on a laptop that I am not using at the moment .

I have attached two worksheets that shows the issues that I have identified . One is from MathCAD 14/15 and the other is saved in the MathCAD 11 format . Basically, I get inconsistant results depending upon the form of the vector used in the calculation of the dot product . I have excerpted the relevant description of the dot product from the MathCAD Help file and tried to implement that explicitly . I am still getting incorrect or inconsistant results .

Please let me know if my interpretation of these results in this worksheet are invalid .

Thank you for your consideration,

>>Tim

3 REPLIES 3

I think the problem is that you think that a complex number is a vector - it isn't, a complex number is a scalar. And if you multiply a complex number with argument 1° with another with argument 91° you a a complex number with argument 92° (thats the value of your variable rho).

In the last part of your file you had set up true vectors and it worked. But you cannot apply arg() to vectors, the argument of arg has to be a (complex) number.

Good Day Werner,

I had always viewed complex numbers as vectors in the complex plane . Seems that many electrical signal processing algorithms project that as such . Perhaps this is a semantic issue with the way that MathCAD defines "vectors" to be a single column matrix as opposed to the more mathematical definition ?

Thanks,

>>Tim

What would the "more mathematical definition" of a vector be in your opinion? To me a vector is a special matrix which also has some special operator defined like dot product. While I would distinguish between row and column vector, in Mathcad only a column vector is named vector, a rwo vector being an 1 x n matrix.

You can represent a complex number in many different ways, a pair of real scalars similar to coordinates in 2D, component representation (a+j*b) polar representation, exponential form, versor form and then even as a 2-element vector (=2x1 matrix), but I consider the latter being quite unusal.

Anyway, to Mathcad a vector is a n*1 matrix consisting of whatever you want - real or complex scalars, strings, or even othere matrices/vectors nested in.

If you use the dot product with complex elements you have further to consider that (a,b)*(c,d) = (a*c" + b*d"), where (a,b) should denote a (column)vector and c" the complement of c. Thats the usual mathematical definition. If you expected simply a*c+b*d you would have to transopse the first vector: (a,b)T*(c,d)=a*c+b*d, thats a simple matrix multiplication.

Top Tags