# Symbolic computation using complex variables

**URL:** <https://community.wolfram.com/t/symbolic-computation-using-complex-variables/20890>\
**Category:** Questions\
**Tags:** algebra\
**Created:** [October 17, 2022, 5:36pm UTC](https://community.wolfram.com/t/symbolic-computation-using-complex-variables/20890 "2022-10-17T17:36:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tedbar](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@tedbar](https://community.wolfram.com/u/tedbar)\
**Post date:** [October 17, 2022, 5:36pm UTC](https://community.wolfram.com/t/symbolic-computation-using-complex-variables/20890/1 "2022-10-17T17:36:25Z")

</div>

I have a complex matrix and a vector of two complex numbers:

```
bs1 = ( {
   {1/Sqrt[2], u},
   {-Conjugate[u], 1/Sqrt[2]}
  } )

```

where u is a complex number.

and the vector

```
state = ( {
   {\[Alpha]},
   {\[Beta]}
  } )

```

where Alpha and Beta are complex numbers. The Norm of the vector should be 1

I wish to compute

```
Norm[bs1.state]^2

```

and then simplify. The result should be:

```
1/2 + Norm[u]^2 = 1

```

However this is predicated on the vector Norm being 1. How do I define the vector specifying that the norm is 1?

As an aside if the Conjugate is not defined say there was u and -u where u, Alpha and Beta are complex how would I specify that they are indeed complex variables for the symbolic evaluation?

---

<div class="post-metadata">

**Author:** ![hdolhaine](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/hdolhaine/32/35924_2.png) [@hdolhaine](https://community.wolfram.com/u/hdolhaine)\
**Post date:** [October 20, 2022, 12:53pm UTC](https://community.wolfram.com/t/symbolic-computation-using-complex-variables/20890/2 "2022-10-20T12:53:18Z")

</div>

Perhaps like this? (Note the change in the notation of state)

```
bs1 = ({{1/Sqrt[2], u}, {-Conjugate[u], 1/Sqrt[2]}});
state = {\[Alpha], \[Beta]}
xx = bs1.state

normxxsquared = Conjugate[xx].xx // FullSimplify
normxxsquared /. Abs[\[Alpha]]^2 -> 1 - Abs[\[Beta]]^2

```

---

<div class="post-metadata">

**Author:** ![tedbar](https://avatars.discourse-cdn.com/v4/letter/t/d26b3c/32.png) [@tedbar](https://community.wolfram.com/u/tedbar)\
**Post date:** [October 20, 2022, 3:16pm UTC](https://community.wolfram.com/t/symbolic-computation-using-complex-variables/20890/3 "2022-10-20T15:16:21Z")

</div>

Thanks. That seems to work. I was hoping for a global definition of the condition but it really makes little difference.

Any chance you know the answer to the second question ;)?

PS - it works for me with or without the change of notation of state.

---

<div class="post-metadata">

**Author:** ![hdolhaine](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/hdolhaine/32/35924_2.png) [@hdolhaine](https://community.wolfram.com/u/hdolhaine)\
**Post date:** [October 20, 2022, 5:01pm UTC](https://community.wolfram.com/t/symbolic-computation-using-complex-variables/20890/4 "2022-10-20T17:01:00Z")

</div>

I must admit that I don’t understand what you mean. I think you should use Conjugate at the appropriate places.
