Combines two lists or matrices into one. In the case of matrices, this is done horizontally rather than vertically.

augment(*list1*,*list2*

augment(*matrix1*,*matrix2*

Press:

- 2nd LIST to access the List menu
- RIGHT to access the OPS submenu
- 9 to select augment(, or use arrows

Alternatively, press:

- MATRX (on the TI-83) or 2nd MATRX (TI-83+ or higher) to access the Matrix menu
- RIGHT to access the MATH submenu
- 7 to select augment(, or use arrows

TI-83/84/+/SE

1 byte

The `augment(` command is used to combine two lists or two matrices into one. For lists, this is done the obvious way: adding the elements of the second on to the elements of the first. For example:

```
augment({1,2,3,4},{5,6,7
{1 2 3 4 5 6 7}
```

For matrices, the columns of the second matrix are added after the columns of the first matrix: an R by C matrix augmented with an R by D matrix will result in an R by (C+D) matrix. For example:

```
augment([[1][2]],[[3][4]
[[1 3]
[2 4]]
```

# Advanced Uses

Use the ` ^{T}` (transpose) command if you want to combine two matrices vertically, rather than horizontally. For example:

```
augment([[1,2]]T,[[3,4]]T)T
[[1 2]
[3 4]]
```

# Optimization

You may be tempted to use `augment(` to add one element to the end of a list:

`:augment(L1,{X→L1`

However, the following way is faster and more memory-efficient while the program is running (although it increases the program's size):

`:X→L1(1+dim(L1`

# Error Conditions

**ERR:DATA TYPE**is thrown if you try to augment a single number to a list, a common error — use {X instead of X.**ERR:DIM MISMATCH**is thrown if you try to augment two matrices with a different number of rows.**ERR:INVALID DIM**is thrown if one of the arguments is a list with dimension 0, or if the result would have dimension over 999 (for lists) or 99x99 (for matrices).

# Related Commands

.