# Question about indexing into an array of arrays

**URL:** <https://discourse.julialang.org/t/question-about-indexing-into-an-array-of-arrays/34000>\
**Category:** New to Julia\
**Created:** [January 30, 2020, 10:03pm UTC](https://discourse.julialang.org/t/question-about-indexing-into-an-array-of-arrays/34000 "2020-01-30T22:03:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathan-durbin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonathan-durbin/32/11468_2.png) [@jonathan-durbin](https://discourse.julialang.org/u/jonathan-durbin)\
**Post date:** [January 30, 2020, 10:03pm UTC](https://discourse.julialang.org/t/question-about-indexing-into-an-array-of-arrays/34000/1 "2020-01-30T22:03:40Z")

</div>

Still learning about how best to use julia. This is probably more of a curious thing I noticed than anything else.

If I create an array like so:

```julia
a = [1, 2], [3, 4]]

```

Both of the following return what I would expect:

```julia
a[1]
a[1, 1, 1]

```

Why does the second line above work? Is there some functionality to being able to do this?

Thanks in advance for the help.

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [January 30, 2020, 10:24pm UTC](https://discourse.julialang.org/t/question-about-indexing-into-an-array-of-arrays/34000/2 "2020-01-30T22:24:36Z")

</div>

This is the explanation from the official manual:

[https://docs.julialang.org/en/v1/manual/arrays/index.html#Omitted-and-extra-indices-1](https://docs.julialang.org/en/v1/manual/arrays/index.html#Omitted-and-extra-indices-1)

> more than `N` indices may be provided if all the indices beyond the dimensionality of the array are `1` (or more generally are the first and only element of `axes(A, d)` where `d` is that particular dimension number). This allows vectors to be indexed like one-column matrices
