# {2} in Position output instead of the number 2

**URL:** <https://community.wolfram.com/t/2-in-position-output-instead-of-the-number-2/4464>\
**Category:** Questions\
**Created:** [January 5, 2015, 2:43am UTC](https://community.wolfram.com/t/2-in-position-output-instead-of-the-number-2/4464 "2015-01-05T02:43:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mayorc](https://avatars.discourse-cdn.com/v4/letter/m/919ad9/32.png) [@mayorc](https://community.wolfram.com/u/mayorc)\
**Post date:** [January 5, 2015, 2:43am UTC](https://community.wolfram.com/t/2-in-position-output-instead-of-the-number-2/4464/1 "2015-01-05T02:43:12Z")

</div>

Hi, I’m using the Position function to get the position of a number in a matrix, but it prints it as {2} instead of 2 and I can’t use it for an index later…

how can i switch it to 2 without the {}??

Please help.

---

<div class="post-metadata">

**Author:** ![jbaldwin](https://avatars.discourse-cdn.com/v4/letter/j/91b2a8/32.png) [@jbaldwin](https://community.wolfram.com/u/jbaldwin)\
**Post date:** [January 5, 2015, 3:54am UTC](https://community.wolfram.com/t/2-in-position-output-instead-of-the-number-2/4464/2 "2015-01-05T03:54:56Z")

</div>

One way is the following:

```
x = {2}
x[[1]]

```

---

<div class="post-metadata">

**Author:** ![seanc](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/seanc/32/34005_2.png) [@seanc](https://community.wolfram.com/u/seanc)\
**Post date:** [January 5, 2015, 4:09pm UTC](https://community.wolfram.com/t/2-in-position-output-instead-of-the-number-2/4464/3 "2015-01-05T16:09:07Z")

</div>

The Position function returns a List of positions. This is because an element might be found in multiple locations on a list.

Position is very often used with First or Last to get the first or last element out of a list.

```
First[Position[....]]

```

This is effectively the same code as posted above.

---

<div class="post-metadata">

**Author:** ![jaebum](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jaebum/32/31033_2.png) [@jaebum](https://community.wolfram.com/u/jaebum)\
**Post date:** [January 6, 2015, 3:02am UTC](https://community.wolfram.com/t/2-in-position-output-instead-of-the-number-2/4464/4 "2015-01-06T03:02:22Z")

</div>

Like Sean mentioned you can use First[Position[…]] or FirstPosition[…] to get the first position of what you look for.

To get element from result, you could do:

```
p = FirstPosition[{a, b, a, a, b, c, b}, b]

Extract[{a, b, a, a, b, c, b}, p]

```

or

```
{a, b, a, a, b, c, b}[[First[p]]]

```
