studEE16A
  • Introduction
  • Linear Algebra
    • Linear Equations
      • Description
      • Example Problems
    • Vector Spaces
      • Description
      • Example Problems
    • Inner Products
      • Description
      • Example Problems
    • Determinants
      • Description
      • Example Problems
    • Eigen-everything
      • Description
      • Example Problems
    • Matrices
      • Description
      • Example Problems
    • Least Squares
      • Description
      • Example Problems
    • Gram-Schmidt
      • Description
      • Example Problems
    • Basis
      • Description
      • Example Problems
    • Page Rank
  • Circuits
    • Circuit Basics
    • Capacitance
    • Nodal Analysis
    • Superposition
    • Thevenin and Norton
    • What, When, Where, and Why?
    • Op Amps
Powered by GitBook
On this page
  • Examples
  • System of linear equations
  • Examples
  • Linear combinations
  • Examples
  • Span
  • Examples
  • Calculation
  • Example 1
  • Example 2
  • Linear independence
  • Calculation
  • Example 1
  • Example 2
  • Extra Resources

Was this helpful?

  1. Linear Algebra
  2. Linear Equations

Example Problems

PreviousDescriptionNextVector Spaces

Last updated 5 years ago

Was this helpful?

Examples

Linear equations

Non-linear equations

System of linear equations

A system of linear equations consists of multiple equations that are solved simultaneously. The easiest method to solve systems of linear equations is through Gaussian elimination.

Examples

{13x1+14x2+12x3=15472x1+23x2+13x3=16315x2+37x3=345\left\{\begin{array}{l} \frac{1}{3}x_1+\frac{1}{4}x_2+\frac{1}{2}x_3=\frac{15}{4} \\ \frac{7}{2}x_1+\frac{2}{3}x_2+\frac{1}{3}x_3=\frac{16}{3} \\ \frac{1}{5}x_2+\frac{3}{7}x_3=\frac{34}{5} \\ \end{array}\right.⎩⎨⎧​31​x1​+41​x2​+21​x3​=415​27​x1​+32​x2​+31​x3​=316​51​x2​+73​x3​=534​​

a1[121]+a2[011]+a3[200]=[52−4]a_1\begin{bmatrix}1 \\ 2 \\ 1\end{bmatrix} + a_2\begin{bmatrix}0 \\ 1 \\ 1\end{bmatrix} + a_3\begin{bmatrix}2 \\ 0 \\ 0\end{bmatrix} = \begin{bmatrix}5 \\ 2 \\ -4\end{bmatrix}a1​​121​​+a2​​011​​+a3​​200​​=​52−4​​

[1−21005−2−14132]\left[\begin{array}{ccc|c}1 & -2 & 1 & 0 \\ 0 & 5 & -2 & -1 \\ 4 & 1 & 3 & 2\end{array}\right]​104​−251​1−23​0−12​​

Overview for the next topics:

Linear combinations

A linear combination of a set of terms is a sum of each term multiplied by a constant. Since a linear combination is basically a weighted sum of each term, the constant coefficients can be thought of as “weights.”

Examples

Span

Examples

Calculation

Example 1

We can just solve the augmented matrix:

Example 2

Let's row-reduce the matrix:

In other words, we could have row-reduced the following augmented matrix:

Linear independence

In other words, a set of vectors is linearly independent if and only if none of its elements is a linear combination of the other elements. Else, the set is considered linearly dependent.

Calculation

To determine whether a set of vectors is linearly independent, we find solutions to the equation

  • If we have pivots in every column, we know that the vectors are linearly independent.

Example 1

We first row-reduce the matrix:

We see that there is no pivot in the third column. Therefore, the given vectors are linearly dependent.

Example 2

Let's row-reduce the matrix:

We observe that there is a pivot in every column of the matrix. Therefore, the given vectors are linearly independent.

Extra Resources

Links to Guerrilla Section Problems and solutions

Guerilla section 1 Problems

Guerilla section 1 Solutions

Links to Exam Problems

Vidoes elaborating guassian elimination

5a⃗+7b⃗5\vec{a} + 7\vec{b}5a+7b is a linear combination of a⃗\vec{a}a and b⃗\vec{b}b.

3a⃗+0b⃗+1c⃗=3a⃗+c⃗3\vec{a} + 0\vec{b} + 1\vec{c} = 3\vec{a} + \vec{c}3a+0b+1c=3a+c is a linear combination of a⃗,b⃗,c⃗\vec{a}, \vec{b}, \vec{c}a,b,c. (Note that we can multiply a vector by 000 as well.)

Sometimes, we want to denote all linear combinations of a set of vectors {a⃗1,a⃗2,…,a⃗n}\{\vec{a}_1, \vec{a}_2, \ldots, \vec{a}_n\}{a1​,a2​,…,an​}. To do this, we define the span of these vectors to be the set of all linear combinations of these vectors:

span{a⃗1,a⃗2,…a⃗n}={c1a⃗1+c2a⃗2+⋯+cna⃗n∣c1,c2,…,cn∈R}\text{span}\{\vec{a}_1, \vec{a}_2, \ldots \vec{a}_n\} = \{c_1\vec{a}_1 + c_2\vec{a}_2 + \cdots + c_n\vec{a}_n \mid c_1, c_2, \ldots, c_n \in \mathbb{R}\}span{a1​,a2​,…an​}={c1​a1​+c2​a2​+⋯+cn​an​∣c1​,c2​,…,cn​∈R}

Note: The zero vector 0⃗∈span{a⃗1,a⃗2,…a⃗n}\vec{0} \in \text{span}\{\vec{a}_1, \vec{a}_2, \ldots \vec{a}_n\}0∈span{a1​,a2​,…an​} for any nnn vectors because we can multiply all of these vectors by 000 to obtain 0⃗\vec{0}0.

span{[100],[010]}\text{span}\left\{\begin{bmatrix}1 \\ 0 \\ 0\end{bmatrix}, \begin{bmatrix}0 \\ 1 \\ 0\end{bmatrix}\right\}span⎩⎨⎧​​100​​,​010​​⎭⎬⎫​ is basically the xxx-yyy plane in R3\mathbb{R}^3R3 because every vector lying on this plane can be expressed as a sum of each vector multiplied by a constant, e.g. [530]=5[100]+3[010]\begin{bmatrix}5 \\ 3 \\ 0\end{bmatrix} = 5\begin{bmatrix}1 \\ 0 \\ 0\end{bmatrix} + 3\begin{bmatrix}0 \\ 1 \\ 0\end{bmatrix}​530​​=5​100​​+3​010​​.

Note: This plane is not the same as R2\mathbb{R}^2R2. Each point on the xxx-yyy plane in R3\mathbb{R}^3R3 has 3 components while all points in R2\mathbb{R}^2R2 only have 2. In general, R2⊄R3\mathbb{R}^2 \not\subset \mathbb{R}^3R2⊂R3.

Similarly, span{[10],[01]}=R2\text{span}\left\{\begin{bmatrix}1 \\ 0\end{bmatrix}, \begin{bmatrix}0 \\ 1\end{bmatrix}\right\} = \mathbb{R}^2span{[10​],[01​]}=R2 because every vector in R2\mathbb{R}^2R2 can be written as a linear combination of [10]\begin{bmatrix}1 \\ 0\end{bmatrix}[10​] and [01]\begin{bmatrix}0 \\ 1\end{bmatrix}[01​].

Suppose we wanted to find out whether a vector b⃗\vec{b}b is in the span of a set of vectors {a⃗1,a⃗2,…,a⃗n}\{\vec{a}_1, \vec{a}_2, \ldots, \vec{a}_n\}{a1​,a2​,…,an​}.

Basically, we are solving trying to find constants c1,c2,…,cnc_1, c_2, \ldots, c_nc1​,c2​,…,cn​ such that c1a⃗1+c2a⃗2+⋯+cna⃗n=b⃗c_1\vec{a}_1 + c_2\vec{a}_2 + \cdots + c_n\vec{a}_n = \vec{b}c1​a1​+c2​a2​+⋯+cn​an​=b

This looks like a system of linear equations, so we can rewrite this in matrix notation: [∣∣∣a⃗1a⃗2⋯a⃗n∣∣∣][c1c2⋮cn]=b⃗\begin{bmatrix}| & | & & | \\ \vec{a}_1 & \vec{a}_2 & \cdots & \vec{a}_n\\ | & | & & |\end{bmatrix}\begin{bmatrix}c_1 \\ c_2 \\ \vdots \\ c_n\end{bmatrix} = \vec{b}​∣a1​∣​∣a2​∣​⋯​∣an​∣​​​c1​c2​⋮cn​​​=b

We can then transform the equation into an augmented matrix: [∣∣∣∣a⃗1a⃗2⋯a⃗nb⃗∣∣∣∣]\left[\begin{array}{cccc|c}| & | & & | & | \\ \vec{a}_1 & \vec{a}_2 & \cdots & \vec{a}_n & \vec{b} \\ | & | & & | & |\end{array}\right]​∣a1​∣​∣a2​∣​⋯​∣an​∣​∣b∣​​

Therefore, solving a system of linear equations is basically finding how we can express the vector b⃗\vec{b}b as a linear combination of the column vectors a⃗1,a⃗2,…,a⃗n\vec{a}_1, \vec{a}_2, \ldots, \vec{a}_na1​,a2​,…,an​. We can conclude:

If the system of linear equations is consistent, then b⃗\vec{b}b is in the span of the vectors a⃗1,a⃗2,…,a⃗n\vec{a}_1, \vec{a}_2, \ldots, \vec{a}_na1​,a2​,…,an​, so b⃗\vec{b}b is a linear combination of the vectors a⃗1,a⃗2,…,a⃗n\vec{a}_1, \vec{a}_2, \ldots, \vec{a}_na1​,a2​,…,an​.

If the system of linear equations is inconsistent, then b⃗\vec{b}b is not in the span of the vectors a⃗1,a⃗2,…,a⃗n\vec{a}_1, \vec{a}_2, \ldots, \vec{a}_na1​,a2​,…,an​, i.e. b⃗\vec{b}b is not a linear combination of the vectors a⃗1,a⃗2,…,a⃗n\vec{a}_1, \vec{a}_2, \ldots, \vec{a}_na1​,a2​,…,an​.

Determine whether [543]\begin{bmatrix}5 \\ 4 \\ 3\end{bmatrix}​543​​ is in the span of [101]\begin{bmatrix}1 \\ 0 \\ 1\end{bmatrix}​101​​ and [120]\begin{bmatrix}1 \\ 2 \\ 0\end{bmatrix}​120​​.

[115024103]∼[115012012]∼[103012000]\left[\begin{array}{cc|c}1 & 1 & 5 \\ 0 & 2 & 4 \\ 1 & 0 & 3\end{array}\right] \sim \left[\begin{array}{cc|c}1 & 1 & 5 \\ 0 & 1 & 2 \\ 0 & 1 & 2\end{array}\right] \sim \left[\begin{array}{cc|c}1 & 0 & 3 \\ 0 & 1 & 2 \\ 0 & 0 & 0\end{array}\right]​101​120​543​​∼​100​111​522​​∼​100​010​320​​

Since the system of linear equations is consistent, [543]\begin{bmatrix}5 \\ 4 \\ 3\end{bmatrix}​543​​ is in the span of [101]\begin{bmatrix}1 \\ 0 \\ 1\end{bmatrix}​101​​ and [120]\begin{bmatrix}1 \\ 2 \\ 0\end{bmatrix}​120​​. In fact, [543]=3[101]+2[120]\begin{bmatrix}5 \\ 4 \\ 3\end{bmatrix} = 3\begin{bmatrix}1 \\ 0 \\ 1\end{bmatrix} + 2\begin{bmatrix}1 \\ 2 \\ 0\end{bmatrix}​543​​=3​101​​+2​120​​.

Determine whether [101]\begin{bmatrix}1 \\ 0 \\ 1\end{bmatrix}​101​​, [120]\begin{bmatrix}1 \\ 2 \\ 0\end{bmatrix}​120​​, and [543]\begin{bmatrix}5 \\ 4 \\ 3\end{bmatrix}​543​​ span R3\mathbb{R}^3R3.

[115024103]∼[115024012]∼[115012000]\begin{bmatrix}1 & 1 & 5 \\ 0 & 2 & 4 \\ 1 & 0 & 3\end{bmatrix} \sim \begin{bmatrix}1 & 1 & 5 \\ 0 & 2 & 4 \\ 0 & 1 & 2\end{bmatrix} \sim \begin{bmatrix}1 & 1 & 5 \\ 0 & 1 & 2 \\ 0 & 0 & 0\end{bmatrix}​101​120​543​​∼​100​121​542​​∼​100​110​520​​

Observe that there is no pivot in the third row. This means that this system of linear equations is not consistent for all vectors in R3\mathbb{R}^3R3, so [101]\begin{bmatrix}1 \\ 0 \\ 1\end{bmatrix}​101​​, [120]\begin{bmatrix}1 \\ 2 \\ 0\end{bmatrix}​120​​, and [543]\begin{bmatrix}5 \\ 4 \\ 3\end{bmatrix}​543​​ do not span R3\mathbb{R}^3R3.

[115b1024b2103b3]∼[115b1024b2012b1−b3]∼[115b1012b22000b2−2(b1−b3)]\left[\begin{array}{ccc|c}1 & 1 & 5 & b_1 \\ 0 & 2 & 4 & b_2 \\ 1 & 0 & 3 & b_3\end{array}\right] \sim \left[\begin{array}{ccc|c}1 & 1 & 5 & b_1 \\ 0 & 2 & 4 & b_2 \\ 0 & 1 & 2 & b_1 - b_3\end{array}\right] \sim \left[\begin{array}{ccc|c}1 & 1 & 5 & b_1 \\ 0 & 1 & 2 & \frac{b_2}{2} \\ 0 & 0 & 0 & b_2 - 2(b_1 - b_3)\end{array}\right]​101​120​543​b1​b2​b3​​​∼​100​121​542​b1​b2​b1​−b3​​​∼​100​110​520​b1​2b2​​b2​−2(b1​−b3​)​​

Let's pick a vector b⃗=[b1b2b3]∈R3\vec{b} = \begin{bmatrix}b_1 \\ b_2 \\ b_3\end{bmatrix} \in \mathbb{R}^3b=​b1​b2​b3​​​∈R3, such that b2−2(b1−b3)≠0b_2 - 2(b_1 - b_3) \neq 0b2​−2(b1​−b3​)=0, such as b⃗=[100]\vec{b} = \begin{bmatrix}1 \\ 0 \\ 0\end{bmatrix}b=​100​​. After row reduction, you will see that [100]∉span{[101],[120],[543]}\begin{bmatrix}1 \\ 0 \\ 0\end{bmatrix} \notin \text{span}\left\{\begin{bmatrix}1 \\ 0 \\ 1\end{bmatrix}, \begin{bmatrix}1 \\ 2 \\ 0\end{bmatrix}, \begin{bmatrix}5 \\ 4 \\ 3\end{bmatrix}\right\}​100​​∈/span⎩⎨⎧​​101​​,​120​​,​543​​⎭⎬⎫​.

In general, there needs to be pivots in every row for a set of vectors to span Rn\mathbb{R}^nRn.

A set of vectors {a⃗1,a⃗2,…,a⃗n}\{\vec{a}_1, \vec{a}_2, \ldots, \vec{a}_n\}{a1​,a2​,…,an​} is said to be linearly independent if and only if the only solution to the equation

c1a⃗1+c2a⃗2+⋯+cna⃗n=0⃗c_1\vec{a}_1 + c_2\vec{a}_2 + \cdots + c_n\vec{a}_n = \vec{0}c1​a1​+c2​a2​+⋯+cn​an​=0

is the trivial solution, c1=c2=⋯=cn=0c_1 = c_2 = \cdots = c_n = 0c1​=c2​=⋯=cn​=0.

Note: A set containing the zero vector 0⃗\vec{0}0 is automatically linearly dependent because there is always a non-trivial set of scalars (the constant corresponding to the zero vector can be anything).

c1a⃗1+c2a⃗2+⋯+cna⃗n=0⃗c_1\vec{a}_1 + c_2\vec{a}_2 + \cdots + c_n\vec{a}_n = \vec{0}c1​a1​+c2​a2​+⋯+cn​an​=0.

[∣∣∣a⃗1a⃗2⋯a⃗n∣∣∣][c1c2⋮cn]=0⃗\begin{bmatrix}| & | & & | \\ \vec{a}_1 & \vec{a}_2 & \cdots & \vec{a}_n \\ | & | & & |\end{bmatrix}\begin{bmatrix}c_1 \\ c_2 \\ \vdots \\ c_n\end{bmatrix} = \vec{0}​∣a1​∣​∣a2​∣​⋯​∣an​∣​​​c1​c2​⋮cn​​​=0

[a⃗1a⃗2⋯a⃗n0⃗]\left[\begin{array}{cccc|c}\vec{a}_1 & \vec{a}_2 & \cdots & \vec{a}_n & \vec{0}\end{array}\right][a1​​a2​​⋯​an​​0​]

Therefore, we just row-reduce the augmented matrix [a⃗1a⃗2⋯a⃗n0⃗]\left[\begin{array}{cccc|c}\vec{a}_1 & \vec{a}_2 & \cdots & \vec{a}_n & \vec{0}\end{array}\right][a1​​a2​​⋯​an​​0​]. Since every row operation will preserve the 000 in the last column of the augmented matrix, we usually omit the last column and only row-reduce the matrix [a⃗1a⃗2⋯a⃗n]\begin{bmatrix}\vec{a}_1 & \vec{a}_2 & \cdots & \vec{a}_n\end{bmatrix}[a1​​a2​​⋯​an​​].

Since c1=c2=⋯=cn=0c_1 = c_2 = \cdots = c_n = 0c1​=c2​=⋯=cn​=0 if the set if linearly independent, we should not find any free variables (which could be any value). Therefore, we should find pivots in every column.

Note: For a set of mmm vectors of size nnn:

If we have pivots in every row, we know that the vectors span the entire subspace Rn\mathbb{R}^nRn.

Note: An m×nm \times nm×n matrix, where m<nm < nm<n, has at most mmm pivots. Therefore, there can never be pivots in each columns (or there would have to be nnn pivots), so the column vectors of such a matrix are automatically linearly dependent. In other words, if the number of vectors in a set exceeds the number of elements in each vector, then this set is automatically linearly dependent. Furthermore, having a “wide” matrix does not guarantee that the set of vectors span Rm\mathbb{R}^mRm.

Determine whether [101]\begin{bmatrix}1 \\ 0 \\ 1\end{bmatrix}​101​​, [120]\begin{bmatrix}1 \\ 2 \\ 0\end{bmatrix}​120​​, and [543]\begin{bmatrix}5 \\ 4 \\ 3\end{bmatrix}​543​​ are linearly independent.

[115024103]∼[115012000]\begin{bmatrix}1 & 1 & 5 \\ 0 & 2 & 4 \\ 1 & 0 & 3\end{bmatrix} \sim \begin{bmatrix}1 & 1 & 5 \\ 0 & 1 & 2 \\ 0 & 0 & 0\end{bmatrix}​101​120​543​​∼​100​110​520​​

Determine whether [101]\begin{bmatrix}1 \\ 0 \\ 1\end{bmatrix}​101​​ and [120]\begin{bmatrix}1 \\ 2 \\ 0\end{bmatrix}​120​​ are linearly independent.

[110210]∼[110201]∼[110100]\begin{bmatrix}1 & 1 \\ 0 & 2 \\ 1 & 0\end{bmatrix} \sim \begin{bmatrix}1 & 1 \\ 0 & 2 \\ 0 & 1\end{bmatrix} \sim \begin{bmatrix}1 & 1 \\ 0 & 1 \\ 0 & 0\end{bmatrix}​101​120​​∼​100​121​​∼​100​110​​

y=32xy = \frac{3}{2}xy=23​x
54x−16y=3\frac{5}{4}x - \frac{1}{6}y = 345​x−61​y=3
62a−3.3b=c6\sqrt{2}a - 3.3b = c62​a−3.3b=c
e1.72⋅π−1.6+5644.5−56.6⋅x1+∫05e−t2+5tdt⋅x2−∑i=0100sin⁡(i)⋅x3=2e^{1.72} \cdot \frac{\sqrt{\pi} - 1.6 + \frac{5}{6}}{44.5 - 5\sqrt{6.6}} \cdot x_1 + \int_{0}^{5} e^{-t^2 + \sqrt{5}t}dt \cdot x_2 - \sum_{i = 0}^{100} \sin(i) \cdot x_3 = 2e1.72⋅44.5−56.6​π​−1.6+65​​⋅x1​+∫05​e−t2+5​tdt⋅x2​−∑i=0100​sin(i)⋅x3​=2
[1.086.22.6][x1x2x3]=4\begin{bmatrix}1.08 & 6.2 & 2.6\end{bmatrix}\begin{bmatrix}x_1 \\ x_2 \\ x_3\end{bmatrix} = 4[1.08​6.2​2.6​]​x1​x2​x3​​​=4
y=x2y = x^2y=x2
a⋅b−5.3c=5a \cdot b - 5.3c = 5a⋅b−5.3c=5
3x3−52y5−54xy=z3x^3 - \frac{5}{2}y^5 - 54xy = \sqrt{z}3x3−25​y5−54xy=z​
∫−5x5csc⁡(t2)dt=2y\int_{-5}^{x} 5\csc(t^2) dt = 2y∫−5x​5csc(t2)dt=2y
https://d1b10bmlvqabco.cloudfront.net/attach/j6h2cdky5zk7c6/hz1x03ot4mb2mj/j7f2i2m14rgn/gs1_final.pdf
https://d1b10bmlvqabco.cloudfront.net/attach/j6h2cdky5zk7c6/hz1x03ot4mb2mj/j7f6yufr2rvo/gs1_solutions.pdf
https://tbp.berkeley.edu/courses/ee/16A/
https://hkn.eecs.berkeley.edu/exams/course/ee/16a
https://www.youtube.com/watch?v=2j5Ic2V7wq4
https://www.youtube.com/watch?v=xCIXkm3-ocQ
https://www.youtube.com/watch?v=g0h_s1p0ax0