# Running out of letters: Pitfalls of Unicode?

**URL:** <https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125>\
**Category:** New to Julia\
**Tags:** unicode\
**Created:** [May 14, 2021, 6:48am UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125 "2021-05-14T06:48:11Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptoche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ptoche/32/23554_2.png) [@ptoche](https://discourse.julialang.org/u/ptoche)\
**Post date:** [May 14, 2021, 6:48am UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/1 "2021-05-14T06:48:11Z")

</div>

It’s a silly question. Here is the dilemma. I’m sort of running out of letters in the sense that I would like to use A for two things in the same project: a float and a matrix. I would normally resolve the dilemma with a `matrixA` or `floatA` option. But since this makes long operations less easy to read and Julia has the power of **unicode** , I’m considering alternatives: Bolding the letter A, a common practice for vectors and matrices. Adding a modifier like a bar to my float. Any opinion?

```
Ā = 1.0
𝐀 = Array{Float64}([1,2])

```

𝐀 is obtained with `\bfA`  
Ā is obtained with `A\bar`

I told you it was a silly question.

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [May 14, 2021, 7:16am UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/2 "2021-05-14T07:16:07Z")

</div>

Perhaps U+1F130 - a boxed A?

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [May 14, 2021, 7:22am UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/3 "2021-05-14T07:22:33Z")

</div>

Are you determined that you cannot use `a` for the scalar? What about `AA` for the matrix?

For unicode, maybe, `\bbA`, or the one that’s called `\mathcal{A}` in LaTeX, but which I don’t know how to typeset in Julia.

---

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [May 14, 2021, 7:25am UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/4 "2021-05-14T07:25:33Z")

</div>

There are also all the alphas.

---

<div class="post-metadata">

**Author:** ![zdenek\_hurak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zdenek_hurak/32/53118_2.png) [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Post date:** [May 14, 2021, 7:58am UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/5 "2021-05-14T07:58:17Z")

</div>

I second the lower case latin or greek for the scalar.

---

<div class="post-metadata">

**Author:** ![ptoche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ptoche/32/23554_2.png) [@ptoche](https://discourse.julialang.org/u/ptoche)\
**Post date:** [May 14, 2021, 9:18am UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/6 "2021-05-14T09:18:24Z")

</div>

Thank for your suggestions! Well I have already used lower-case `a` and `α` (forgot to say). Capital α was my first thought, but it looks too similar to A: Α (`\Alpha`). I’m not sure which one is `\mathcal{A}`, but there’s 𝔸 (`\bbA`, that’s `\mathbb{A}` in LaTeX) and 𝒜 (`\scrA`) and 𝓐 (`\bscrA`) . Probably not great for a matrix. However, this one 𝒶 (`\scra`) would work for the scalar. It looks different enough from a:

```
a ≠ 𝒶

```

Thanks again. Now back to multiplying matrices! 😂

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [May 14, 2021, 11:01am UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/7 "2021-05-14T11:01:34Z")

</div>

> [@ptoche](#):
>
> I’m not sure which one is `\mathcal{A}` , but there’s 𝔸 ( `\bba` , that’s `\mathbb{A}` in LaTeX) and 𝒜 ( `\scrA` ) and 𝓐 ( `\bscrA` )

`\bba` is lowercase, 𝕒, while 𝔸 is `\bbA`. I think `\scrA` is the one I was thinking of as `\mathcal{A}`. But you don’t think the latter is good for a matrix?

---

<div class="post-metadata">

**Author:** ![mschauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mschauer/32/13946_2.png) [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Post date:** [May 14, 2021, 11:29am UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/8 "2021-05-14T11:29:37Z")

</div>

> [@ptoche](#):
>
> `A = 1.0`

You didn’t come here for the answer “_just name the scalar `a`_”, right?

---

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [May 14, 2021, 1:19pm UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/9 "2021-05-14T13:19:36Z")

</div>

I recall that the “doubled-line” letters such as `\bbA` used to be used when there was such a thing as a blackboard. Lecturers would write matrices in that way. But of course there were alternatives: underscore for vector, double underscore for matrix, etc.

---

<div class="post-metadata">

**Author:** ![ptoche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ptoche/32/23554_2.png) [@ptoche](https://discourse.julialang.org/u/ptoche)\
**Post date:** [May 14, 2021, 8:29pm UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/10 "2021-05-14T20:29:01Z")

</div>

You’re right: I remember that. In high school at some point we were even forced to put arrows on top of vectors. I think a more common practice these days is to bolden the letters, but I find that less easy to distinguish visually (maybe it has to do with the dark theme I’m using). So far I find the greatest visual difference is obtained with 𝔸 (`\bbA`), 𝒜 (`\scrA`), and 𝒶 (`\scra`) or decorating with a bar, a hat or other squiggle, while bolding and italicizing don’t go quite far enough when you’re quickly scanning a document. 👍

---

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [May 14, 2021, 8:30pm UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/11 "2021-05-14T20:30:57Z")

</div>

See also [Mathematical Alphanumeric Symbols - Wikipedia](https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols)

---

<div class="post-metadata">

**Author:** ![ptoche](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ptoche/32/23554_2.png) [@ptoche](https://discourse.julialang.org/u/ptoche)\
**Post date:** [May 14, 2021, 8:32pm UTC](https://discourse.julialang.org/t/running-out-of-letters-pitfalls-of-unicode/61125/12 "2021-05-14T20:32:47Z")

</div>

> [@DNF](#):
>
> But you don’t think the latter is good for a matrix?

That was my first reaction, but shortly after saying this, I started noticing that it’s used with great effect in some excellent code. It’s concise and very easy to identify visually. So I’ve basically changed my mind. I’ll change all my other matrices for consistency (because I do have `B`, `C`, and a few others). Thanks DNF! 👍
