Computing Inner Products in C: Simplifying Complex Vector Calculations

  • Thread starter Thread starter torquerotates
  • Start date Start date
  • Tags Tags
    Computing
Click For Summary
SUMMARY

The discussion focuses on computing inner products of complex vectors, specifically x=(2,1+i,i) and y=(2-i,2,1+2i). Participants clarify that the traditional formula =|a||b|cos(theta) is not applicable for complex numbers. Instead, they emphasize using the definition of the inner product for complex vectors, which involves summing the products of corresponding components, taking the complex conjugate of the first vector's components. This method simplifies the calculation and aligns with standard practices in linear algebra.

PREREQUISITES
  • Understanding of complex numbers and their properties
  • Familiarity with inner product definitions in linear algebra
  • Basic knowledge of vector operations
  • Proficiency in C programming for implementing calculations
NEXT STEPS
  • Study the definition of inner products for complex vectors
  • Learn how to implement complex number operations in C
  • Explore linear algebra concepts related to vector spaces
  • Review examples of inner product calculations in both real and complex contexts
USEFUL FOR

Students in linear algebra, C programmers working with complex data types, and anyone interested in advanced vector calculations.

torquerotates
Messages
207
Reaction score
0

Homework Statement

x=(2,1+i,i) and y=(2-i,2,1+2i)



Homework Equations





The Attempt at a Solution

um ok normally i would use <a,b>=|a||b|cos(theta). But these are complex numbers. I have no clue how to do this.
 
Physics news on Phys.org
Surely you have a definition to appeal to?

(and I'm pretty sure that <a,b>=|a||b|cos(theta) isn't it -- and even if that equation were correct, it is rare that you'd actually want to use it to compute an inner product)
 
Suppose instead you were just working with real vectors -- say (2,20,2) and (10,1,1). There is no need to compute the angle between these vectors. There is a much easier way to do this. What is another way to compute the inner product that |a||b|cos(theta)? How would you generalize this to complex numbers?

And finally, what is in your class notes and text? I am quite certain your instructor does not expect you to derive the formula for computing the inner product in C3. He or she expects you to use something you have already been taught.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
5
Views
2K
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K