> For the complete documentation index, see [llms.txt](https://docs.quadratichq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quadratichq.com/formulas/arrays.md).

# Arrays

Write formulas that operate on many cells at once.

An array can be written using `{}`, with `,` between values within a row and `;` between rows. For example, `{1, 2, 3; 4, 5, 6}` is an array with two rows and three columns:

| 1 | 2 | 3 |
| - | - | - |
| 4 | 5 | 6 |

Arrays cannot be empty and every row must be the same length.

Numeric ranges (such as `1..10`) and cell ranges (such as `A1:A10`) also produce arrays. All operators and most functions can operate on arrays, following these rules:

1. Operators always operate element-wise. For example, `{1, 2, 3} + {10, 20, 30}` produces `{11, 22, 33}`.
2. Functions that take a fixed number of values operate element-wise. For example, `NOT({TRUE, TRUE, FALSE})` produces `{FALSE, FALSE, TRUE}`.
3. Functions that can take any number of values expand the array into individual values. For example, `SUM({1, 2, 3})` is the same as `SUM(1, 2, 3)`.

When arrays are used element-wise, they must be the same size. For example, `{1, 2} + {10, 20, 30}` produces an error.

When an array is used element-wise with a single value, the value is expanded into an array of the same size. For example, `{1, 2, 3} + 10` produces `{11, 12, 13}`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.quadratichq.com/formulas/arrays.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
