4 posts
• Page **1** of **1**

I have two vectors to be multiplied. Both elements of vectors are complex numbers. The dimension of first one is (8*1) and the second is (6*1). I want to know if it possible to use lapack to multi these vectors.

- alrawi84
**Posts:**3**Joined:**Fri Sep 18, 2015 11:47 am

What are you trying to do? If you're trying to do a dot product the operation doesn't make sense. If you're trying to compute an outer product (a * b') and create a matrix of the multiplied entries, then you should use the BLAS function Ger (general rank one)

- btracey
**Posts:**11**Joined:**Mon Aug 10, 2015 6:40 pm

btracey wrote:What are you trying to do? If you're trying to do a dot product the operation doesn't make sense. If you're trying to compute an outer product (a * b') and create a matrix of the multiplied entries, then you should use the BLAS function Ger (general rank one)

Thanks Btracey for your reply. What exactly I want to do is multiply one vector with [8 rows x 1 column] x another vector with [ 6 rows x 1 column ]. As far as I know it is not possible to do this kind of multiplication because the number of columns don't match the number of rows of second vector. Is it possible to do it by using BLAS library.

- alrawi84
**Posts:**3**Joined:**Fri Sep 18, 2015 11:47 am

That paritcular operation is not possible. Matrix multiplication is only defined for (m x k) x (k x n). In your case, you have (8 x 1) x (6 x1). These sizes do not match, and so the operation is not defined. Similarly, if you mean dot product, dot product is only defined for vectors of the same length. It's not possible to do what you ask, because the operation is not defined. It is possible to do x * y' (to make it (8 x 1) x (1 x 6)) if that's what you mean.

- btracey
**Posts:**11**Joined:**Mon Aug 10, 2015 6:40 pm

4 posts
• Page **1** of **1**

Users browsing this forum: No registered users and 3 guests