> For the complete documentation index, see [llms.txt](https://lewisla.gitbook.io/learning-quantum/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lewisla.gitbook.io/learning-quantum/linear-algebra/vector-relationships.md).

# Vector Relationships

## Linear Combinations

Linear combinations logically follow from the matrix operations covered in [*Basics*](/learning-quantum/linear-algebra/basics.md) - simply put, it's a combination of two vectors, scaled by numbers.

$$|x\rangle = a |a\rangle + b |b\rangle$$

Here $$|x\rangle$$is a linear combination of the vector $$|a\rangle$$scaled by the constant $$a$$ and the vector $$|b\rangle$$scaled by the constant $$b$$. Here is an example:

$$
Let \hspace{8pt}a=0, b=1 \hspace{8pt} & \hspace{8pt}
|a\rangle=\begin{bmatrix}1\2\end{bmatrix}, |b\rangle=\begin{bmatrix}3\5\end{bmatrix}
$$

$$
|x\rangle = a |a\rangle + b |b\rangle = 0\*\begin{bmatrix}1\2\end{bmatrix}+1\*\begin{bmatrix}3\5\end{bmatrix}= \begin{bmatrix}3\5\end{bmatrix}
$$

$$
|x\rangle = \begin{bmatrix}3\5\end{bmatrix}
$$

{% hint style="info" %}
[Detailed explanation of linear combinations](https://www.khanacademy.org/math/linear-algebra/vectors-and-spaces/linear-combinations/v/linear-combinations-and-span)
{% endhint %}

## Linear Dependence

So if we have a set of vectors, how do we define the relationships between those vectors, and what do those relationships tell us about the whole system? Well, in the example above we have a set of three vectors - $$|x\rangle, |a\rangle, |b\rangle$$.

$$|x\rangle$$is dependent on$$|a\rangle$$and$$|b\rangle$$, because $$|x\rangle$$ is defined by$$|a\rangle$$and$$|b\rangle$$. Without them,$$|x\rangle$$could not exist. And since one of the vectors in the set is dependent on one of the other vectors in the set, the whole set can be said to be *linearly dependent.*

## Linear Independence&#x20;

So if a set includes a vector which can be described as a linear combination of other vectors in the same set, then the whole set is said to be linearly dependent.

Logically, if this is not the case, and none of the vectors in the set can be described as linear combinations of each other, the whole set is said to be *linearly independent*.

{% hint style="info" %}
[Detailed explanation of linear independence](https://www.khanacademy.org/math/linear-algebra/vectors-and-spaces/linear-independence/v/linear-algebra-introduction-to-linear-independence)
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lewisla.gitbook.io/learning-quantum/linear-algebra/vector-relationships.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
