# Why does \[1; 2; 3\] creates an Array of dimension 1 instead of 3x1 Array of dimnesion 2

**URL:** https://discourse.julialang.org/t/why-does-1-2-3-creates-an-array-of-dimension-1-instead-of-3x1-array-of-dimnesion-2/11233
**Category:** General Usage
**Tags:** array
**Created:** [May 29, 2018, 1:35pm UTC](https://discourse.julialang.org/t/why-does-1-2-3-creates-an-array-of-dimension-1-instead-of-3x1-array-of-dimnesion-2/11233 "2018-05-29T13:35:07Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)
#### Post date: [May 29, 2018, 2:40pm UTC](https://discourse.julialang.org/t/why-does-1-2-3-creates-an-array-of-dimension-1-instead-of-3x1-array-of-dimnesion-2/11233/5 "2018-05-29T14:40:00Z")

</div>

Just for reference:

> [@How to create a 2x1 Array?](https://discourse.julialang.org/t/how-to-create-a-2x1-array/8337):
>
> TL;DR, answer: to get a 2x1 Array/Matrix transpose a 1x2 matrix, for example: [2 4]' A more general solution that also works for complex numbers in Julia V0.7- would be transpose([2 4]) I wanted to test julia\> maximum([1 2; 3 4], 2) 2×1 Array{Int64,2}: 2 4 So I tried julia\> maximum([1 2; 3 4], 2) == [2;4] false I expected the value to be true, but the value is false because julia\> [2;4] 2-element Array{Int64,1}: 2 4 That is, a 2×1 Array{Int64,2} is not the same as a 2-element Arra…

> <https://github.com/JuliaLang/julia/issues/7128>
>
> Much gnashing of teeth derives from the overlap between syntax for array literal… construction and array concatenation in Julia – largely inherited from Matlab. Perhaps we should just use a different syntax for block matrix construction entirely. One thought would be this:
> 
> \`\`\` julia
> | a b
> c d |
> \`\`\`
> 
> This has the advantage of being pretty terse and lightweight. For example, the current idiom of expanding a range into an array is \`\[1:10\]\` which would become \`|1:10|\` while \`\[1:10\]\` would construct a one-element array of type \`UnitRange{Int}\`.

---

_[View the full topic](https://discourse.julialang.org/t/why-does-1-2-3-creates-an-array-of-dimension-1-instead-of-3x1-array-of-dimnesion-2/11233)._
