28

Is there a single, more generic term that can be used to describe both a row and a column?

In English, we can refer to a line as being horizontal or vertical, but unless we say ‘a line of something’, that implies a one-dimensional line—it doesn't communicate a row or a column of things. So what could we say instead…? A horizontal or vertical _______?

11
  • 6
    Rows and columns are 'linear arrays'.
    – Kris
    Oct 22, 2013 at 7:51
  • 1
    In chess rows are ranks, and columns are files; in math the rows and columns of a matrix are vectors. In spreadsheets terminology, rows and columns are arrays, although what Kris wrote would be more precise.
    – Talia Ford
    Oct 22, 2013 at 9:10
  • 6
    In spreadsheets specifically, a subset of the sheet is often called a range. Rows and columns are almost always just called "rows and columns", though. You should perhaps give an example of a context where you want to use the word?
    – starwed
    Oct 22, 2013 at 20:35
  • 2
    @TaliaFord On that note, is there a general term for 'ranks' and 'files'? :-) Oct 22, 2013 at 22:05
  • 3
    @CJDennis, if the question had been asked in Stack Overflow, it would have been closed for being 'opinion based'. But it's a good question, so where does it belong? I would say right here, because it's fundamentally a question about word choice and usage, even if the background context (as we learn in Duncan's 'edit') happened to be the naming of a programming variable. I'm going to remove the edit and suggest that the question be reopened.
    – Kal
    Apr 22, 2021 at 23:17

10 Answers 10

11

I think the word he is look for is "vector"; i.e. a line of indeterminate length in a specific direction.

2
  • 3
    Not coincidentally, vector can also mean "a matrix with one row or column".
    – user28567
    Oct 22, 2013 at 22:38
  • I agree with the word vector, but your explanation should be improved, including references to common usage or authoritative definition. " a line of indeterminate length in a specific direction" doesn't really respond clearly to the question. Oct 23, 2013 at 6:39
8

How about axis?

  1. (Mathematics) one of two or three reference lines used in coordinate geometry to locate a point in a plane or in space.

(Collins English Dictionary – Complete and Unabridged)

Update:

You say you're looking for a name for a code variable. Seeing as people here struggle so much to find such a word, I'm guessing whatever you settle on will confuse whoever reads your code just as much. I'd just skip trying to be pithy and go for rowOrColumn. Clarity over brevity.

2
  • 1
    This is valid in some uses - row or column can mean the index of the row or column as a means of addressing (along the lines of r and c axes), or it can mean the contents of an entire row or column, for which axis doesn't match.
    – Chris H
    Oct 22, 2013 at 9:20
  • I disagree with axis because a row doesn't need to lie along the x axis and a column doesn't need to lie on the y axis, though each will be parallel to one or the other axis. But I voted up your conclusion that rowOrColumn would work in code when English lacks a term perfectly fitting the definition. Aug 21, 2023 at 5:22
7

Thank you all for your suggestions.
I need this term for a logical function name in an assignment for students who aren't programmers, so a lot of the words put forward here would not mean much to them.

I asked a colleague about it and he suggested 'line'.
I'll use this as it makes logical sense for the match 3 game example project they will be completing, and I thought I'd return and share.

5

Vector

What you describe are referred to as row vectors and column vectors. (Collectively, they are vectors.)

For example, in linear algebra, a row in a matrix represents the coefficients of one linear equation from a system of linear equations. Taken alone, that row is considered a vector (a row vector), and can just as easily be used to calculate the solution for that single linear equation. The "vector dot product" is used with a row vector and a column vector. Here is a link to a simple explanation for those less familiar with this concept. This picture (from the article) illustrates the idea:

enter image description here

While the picture also illustrates a column matrix, it's a degenerative case where there is only one column [x y z] in the matrix. But the concept can be extended over multiple columns, where the result of multiplying a row by a column follows the same vector dot product process.

Less common in the context, Tuple is an ordered list of elements. As this article in Wikipedia states, a tuple can be used to represent other objects in mathematics (besides a simple list of elements), with vectors being the first example. You might consider "tuple" to be a hypernym of "vector".

When it comes to tables like spreadsheets, I would consider some cases of a delineated part of a column or of a row to be a list. (I say "delineated part" because the spreadsheet array is so expansive that we often might put multiple independent tables and arbitrary objects in an array.)

3

Other word for a row and a column can be "tuple".

3
  • 1
    That's not what the OP is asking. A tuple would be representing a row and a column as "row, column", an ordered collection of values. He's looking for a generic term, such as "spreadsheet axis", that describes either of them. Oct 22, 2013 at 7:56
  • 3
    Why would a tuple need to be representing a row and a column as (row, column)? Just because 2-tuples frequently represent (row, column) doesn't mean all tuples must. I can't see a reason why a tuple can't represent all the data in a row or all the data in a column if so desired.
    – Timotheos
    Aug 25, 2016 at 8:57
  • In programming a tuple is generally a 1-dimensional heterogeneous collection and can be seen as a generalization of an array or vector which are terms for homogeneous collections. Arrays may be either 1-dimensional or multidimensional depending on the language etc, arrays are specifically 1-dimensional. (Just explaining for any wanderers who don't already know these technical details.) Aug 21, 2023 at 5:27
3

One possibility is series. This is the term used in pandas for either a row or a column taken from a rectangular DataFrame. Pandas is a widely used open-source data analysis package written in Python.

The key idea is that a series is iterable, and that the elements have indices, which can be column headers (to index a row) or row names (to index a column). However, it doesn't matter whether the series itself comes from a row or a column.

As you might expect, it is possible in pandas to assemble a DataFrame from a list of series, which can become either the rows or the columns, depending on the construction technique.

A series can be converted to a numpy array or to a Python list, i.e. these are common terms for a one-dimensional data structure. However, neither of these have arbitrary labels like a series, which is possibly why the designers of pandas chose the term, and why it might be a plausible choice for the application you hint at in the original question.

2

I propose "band".

I am suggesting this as a new usage, as we do not seem to otherwise have a common word for this kind of thing.

I was coming at this question from the perspective of separating the row/column from the dividers separating them. The dividers, being narrow, are properly referred to as lines:

2: a straight or curved geometric element that is generated by a moving point and that has extension only along the path of the point

https://www.merriam-webster.com/dictionary/line

In typical usage, a band is generally something thin and long, but generally indicates non-trivial thickness:

3: a strip serving to join or hold things together (belt, book band)

4: a thin flat encircling strip (strip of cloth, ring of elastic)

5a: strip (as of living tissue or rock) or a stripe (as on an animal) differentiable (as by color, texture, or structure) from the adjacent material or area

5b: a more or less well-defined range of wavelengths, frequencies, or energies

5c: range 7a

https://www.merriam-webster.com/dictionary/band

I particularly like the wavelength example; in science, we can refer to a spectral line (very narrow, specific wavelength emitted or absorbed) vs. a band, which indicates a wide range of wavelengths.

As I'm thinking about this, I'll also suggest for discussion "lane" or "track" as alternatives, though to me those both suggest motion along them.

2
  • Thank you for your contribution Nick. Could you edit your answer to provide a reference, dictionary definition or the like to support your suggestion for band as a common term for row and column. If rather you are suggesting a new usage, perhaps you could make that clear.
    – David
    Aug 6, 2017 at 9:58
  • All excellent suggestions! They're all as generic and commonplace in regular english as line but less likely to be overloaded and thus ambiguous in the field of programming than some of the technical terms suggested. One thing is that none of them imply a 1-unit width but since they don't have prior set programming use, that can be easily and unambiguously specified in the code. Aug 21, 2023 at 5:32
2

A row does not have to be horizontal. In general usage a row can be anything arranged in a straight line, vertical or horizontal. It's only in the mathematical and computer usage that it implies horizontal.

To make it clear what you mean you could say

vertical and horizontal rows

1
  • Agreed. In English row has both a more general and a more specific sense. It only necessarily takes on the more specific sense in contexts where it needs to contrast with column. In English this works but in programming it generally be too ambiguous. Aug 21, 2023 at 5:29
1

I'm very late here, but I found this while googling for a related problem, and none of the suggestions quite fit my use-case (a sequence of cells on a game grid, but one in which the player moves around rather than connecting things like in OP's case, so "line" didn't make sense).

I ended up using "path", which is not a general-purpose solution for this kind of thing (because it can easily refer to nonlinear paths, or ones shorter than the width/height of the board), but in context it solved my problem nicely so I thought I'd mention it.

0
0

A bit late to the game after so many answers but how about ‘field’? This is a term used by database engineers to refer to a collection of data in a known configuration and has some crossover into math.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.