# Understand the meaning of & operator?

**URL:** <https://community.wolfram.com/t/understand-the-meaning-of-operator/13768>\
**Category:** Questions\
**Created:** [March 11, 2019, 2:34am UTC](https://community.wolfram.com/t/understand-the-meaning-of-operator/13768 "2019-03-11T02:34:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ermannocit](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@ermannocit](https://community.wolfram.com/u/ermannocit)\
**Post date:** [March 11, 2019, 2:34am UTC](https://community.wolfram.com/t/understand-the-meaning-of-operator/13768/1 "2019-03-11T02:34:39Z")

</div>

Hi there,

A simple problem appeared and I can’t solve it by myself. Plese don’t focus on the meaning of the functions and of the values assigned to variables: I suspect the problem is on how I treat aa and bb.

After defining the following functions XX and Hvv that I can call in the code:

```
XX = -Inverse[aa].(bb.UU );

Hvv = cc.(Inverse[s i - aa].bb);

```

If I call

```
X=XX&[aa=4,bb=5,cc=6]

```

and then call Hvv

```
Hv=Hvv&[aa=6,bb=7]

```

I get wrong values for Hv.

But if after calling X=XX&(ecc.) I re-evaluate the definition of Hvv = cc.(Inverse[s i - aa].bb) then everything is fine if I call now Hv=Hvv(ecc.).

I guess I’m misunderstanding the meaning of f(aa)&(aa=a) which I intend as “evaluate f ifor aa=a”.

You guys have insight on how to solve this?  
Thanks.

---

<div class="post-metadata">

**Author:** ![kmartin](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/kmartin/32/38196_2.png) [@kmartin](https://community.wolfram.com/u/kmartin)\
**Post date:** [March 11, 2019, 3:54am UTC](https://community.wolfram.com/t/understand-the-meaning-of-operator/13768/2 "2019-03-11T03:54:16Z")

</div>

Are you able to provide a minimal example with code one could actually evaluate?

I think there are some fundamental issues in your syntax. For example to define a function `XX` with 3 arguments you would want to instead do

```auto
XX[aa_, bb_, UU_] := -Inverse[aa].(bb.UU )

```

or something similar. The following doesn’t really make a ton of sense:

```auto
XX = -Inverse[aa].(bb.UU );
X=XX&[aa=4,bb=5,cc=6]

```

Consider this documentation page: [Functions and Programs—Wolfram Documentation](https://reference.wolfram.com/language/tutorial/DefiningFunctions.html)

---

<div class="post-metadata">

**Author:** ![ermannocit](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@ermannocit](https://community.wolfram.com/u/ermannocit)\
**Post date:** [March 11, 2019, 11:23pm UTC](https://community.wolfram.com/t/understand-the-meaning-of-operator/13768/3 "2019-03-11T23:23:27Z")

</div>

Thanks a lot.  
I’m learning Mathematica bit by bit so I do not have the general picture. Now I know how to define and call proper functions and the code works fine.

What I did until know (and worked until now) was declaring variables (dependent “functions”) which depended on other variables (independent variables) and then evaluate the dependent ones using & operator on the independent.
