Cardinality of a tuple Studying Linear Algebra, I learned how the dimension of a vector space $E$ is just the number of elements in any base of the vector space $E$.
$$ \mathscr{B}=(e_1, e_2, ..., e_n) \quad \text{base of E} \implies \mathrm{dim}(E)=n $$
If I wanted to further formalize this idea, it would come natural to me to express the notion of "number of elements in a tuple" as a cardinality. My textbook introduces basis of vector spaces as tuples after all.
Could I write something like $ \mathrm{card}(\mathscr{B})=n=\mathrm{dim}(E) $ or not? I know that the notion of cardinality is made for sets. Is there anything similar for indicating the "length of a tuple"?
 A: Probably, "expressing cardinality as length" would provide better synthesis than "expressing length as cardinality".
For example, the cardinality of a $n$-set $X = \{ x_1, x_2, \dotsc, x_n \}$ can be expressed as the length of a maximal chain of subsets
$$ \emptyset \subset \{ x_1 \} \subset \{ x_1, x_2 \} \subset \dotsb \subset \{ x_1, x_2, \dotsc, x_n \}, $$
which equals the number of $\subset$ in the above. What about the dimension of $n$-dimensional vector space $E = \langle e_1, e_2, \dotsc, e_n \rangle$? It can be expressed as the length of a maximal chain of subspaces
$$ \{ 0 \} \subset \langle e_1 \rangle \subset \langle e_1, e_2 \rangle \subset \dotsb \subset \langle e_1, e_2, \dotsc, e_n \rangle. $$
A: The primitive construction that lets you handle tuples in set theory is the cartesian product $X\times Y$. Here when you say a tuple, what you mean implicitly is an element of an iterated cartesian product of $E$, of the form $E\times E\times E\times \ldots\times E = E^n$ for some $n$. The integer $n$ is what you want to call the length of the tuple. So a tuple does not even exist independently of its length.
Bear in mind that the situation is quite different to what happens with sets, as sets are taken as primitive objects, and their cardinal come much later.
That being said, if you do not care about the foundations, these two notions are, as you noted, functionnally equivalent, if you consider a tuple as a ordered set (let's limit oursvelves to finite countably many), the length of the tuple is analgous to the cardinal of the set.
A: There is something like this in formal language theory, but I think it is fair to say that a certain amount of haziness surrounds the concept.
The haziness is well illustrated by the article Free monoid - Wikipedia:

In formal language theory, usually a finite set of "symbols" $A$ (sometimes called the alphabet) is considered. A finite sequence of symbols is called a "word over $A$", and the free monoid $A^∗$ is called the "Kleene star of $A$". [$\ldots$] If $A$ is any set, the word length function on $A^∗$ is the unique monoid homomorphism from $A^∗$ to $(\mathbb{N}_0,+)$ that maps each element of $A$ to $1.$ A free monoid is thus a graded monoid.[clarification needed]

(1) For one thing, it is not at all clear (to me, at least!) what a "symbol" is; thus it is not at all clear whether the terminology above extends to arbitrary sets $A$ or not.
(2) The request under "clarification needed" reads thus:

Give a definition of 'graded monoid' or a reference to it. A Wikipedia article 'graded ring' exists, but it doesn't define graded monoids. In case 'graded' is meant just informally, the sentence should better be rephrased as e.g. 'Due to this additional functionality, some authors call a free monoid a ⟨graded⟩ one.'

(3) There is also some controversy on the page Talk:Free monoid - Wikipedia:

You can't define concatenation on lists? And what is a list abstractly if not a string of elements of some other data type? The alphabet need not be characters. The article on list was wrong. I've fixed it.

(Having lit the blue touch paper, I now hastily retire from the discussion!)
