Multiplication of complex matrices

조회 수: 36 (최근 30일)
Vage Karakhanyan
Vage Karakhanyan 2019년 10월 24일
댓글: Vage Karakhanyan 2019년 10월 24일
I have noticed that when I multiply 2 matrices with complex elements A*B, Matlab takes the complex conjugate of matrix B and multiplies A to conj(B).
For example I have a complex vector a = [2+0.3i, 6+0.2i], so the multiplication a*(a') gives 40.13 which is not correct. However, when I want to calculate square of the norm of vector 'a' norm_square = a*conj(a)' I get complex number which is a sum of squares of the vector components.
My question is: is it a bug or I just dont get the way matlab works with complex numbers?
  댓글 수: 1
James Tursa
James Tursa 2019년 10월 24일
"when I multiply 2 matrices with complex elements A*B, Matlab takes the complex conjugate of matrix B and multiplies A to conj(B)"
No, it doesn't.

댓글을 달려면 로그인하십시오.

채택된 답변

James Tursa
James Tursa 2019년 10월 24일
편집: James Tursa 2019년 10월 24일
There are two different operators:
' is the complex conjugate transpose
.' is the straight transpose (no complex conjugate), notice the dot
Use the operator that is appropriate for your application. If you only want the transpose with no conjugation, then use the dot version .'
Side Note: Related to this, the dot( ) function effectively uses the ' operation internally ... i.e., it does a complex conjugate of the first argument.
  댓글 수: 1
Vage Karakhanyan
Vage Karakhanyan 2019년 10월 24일
Ok I see. Thank you very much!!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by