Skip to main content
Engineering LibreTexts

13.1: Introduction

  • Page ID
    54754
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    An array is a collection or set of data. A variable can hold a single value. An array can hold multiple values. The type (i.e., integer, real, etc.) of each item in the array must be the same. In order to access specific elements, an index or subscript is used. The index specifies which element or value in the array is being accessed.

    An array is considered a direct access structure since any element can be accessed directly without accessing any other elements.

    The most basic form of an array is a single dimension array. A single dimension array can be thought of as a single column in a spreadsheet. The column name, like \(A\), is the array name and the row number is like the index. For example, a spreadsheet column might appear as follows:

    A spreadsheet column.

    A single dimension array is logically the same and might look like:

    A single dimension array.

    The array name is chosen by the programmer and thus is not limited to \(A\). The specific syntax requires an index or subscript to specify which element of the array to access. By default, the first element is at index=1, the next at index=2, and so forth. This can be changed if needed.


    This page titled 13.1: Introduction is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Ed Jorgensen via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.

    • Was this article helpful?