#linear-algebra
2 messages ยท Page 76 of 1
do linear programming questions fall under this channel?
i guess they would yeah
What if the first variable (x1) is a free variable? What will the rref look like?
I cant load my professors lectures so I am not sure how to do these problems
did you email your professor
Yeah it seems to be some technical issue with blackboard
She has doesnt want to upload it on youtube*
maybe try suggesting get something set up on google drive or drop box maybe, idk just an idea
well that sucks
But I got other youtube videos to help me thankfully
But how would I do this problem
Would I write H as a matrix then rref?
H can also be defined as:
[3 2][a]
[1 -3][b]
And that left matrix is A.
@gloomy arrow
I suggest actually carrying out that multiplication to see why it works
hello
can someone point me to somewhere that talks about orthogonal matrices?
i don't understand why it has the properties that it has
Can I just pick W as $F^4$, since every vector space is a subspace of itself. Then proving U+W=$F^4$ should be very easy.
Darius:
@half ice Ye I am getting that. Do I just reduce the matrix and find the column space?
Oh wait that is just straight up A that I needed
Okay okay I see I see
@potent totem you cannot use W=F^4
Direct sum means that every vector is uniquely written as the sum of vector from U and W
$+$ is different from $\oplus$
Zopherus:
I completely overlooked that, ty.
$T: \mathbb R^3 \to \mathbb P_2$ can just be
KS42:
*isomorphic
ye ye
KS42:
I just said that the zero vector is not included, that would not make it subspace
Or is there something formal I should do
no thats right
yea thats sufficient
Alright thanks
though its also not closed over addition
How is it not also closed under addition?
like given x, y
and w, z
H(x, y) + H(w, z) does not equal H(x+w, y+z)
which is a condition
somebdoy correct me if im wrong
Oh its because of that 1 right?
yea
I said for my explanation "H is not a subspace because the zero vector is not an element of H"
thats fine
Alright thank you
its sufficient im pretty sure
the set of whatever spans the space
Makes sense sorry have to review some more
ye dont worry its confusing im taking it too
lokey can somebody help
theres 2 conditions
and i cant do it
straight it makes no sense i'm getting two matrices
Would I just turn this into a matrix and then the columns become the spanning set?
you can just write it as xv1 + yv2 + zv3 and then {v1, v2, v3} will be the spanning set (by definition)
I see alright
Would this be
[1 -1 0]
[0 2 1]
I just turned the right part into a matrix dont know if that works and why
it works because the solutions to Av = 0 are the same as the solutions to
x - y = 0
2y + z = 0
when taking v = (x,y,z)^T.
maybe that sounds a bit tautological... because it is. You can go between the systems of equations representation and the matrix representation and the variables all remain the same.
and yea, the matrix you got for A is right
The nullspace is just all the vectors that solve Av=0
Okay yeah that make sense that they would be the same as that system
Would I need to do row operations? Or would the size of the column space just be the number of rows because thats how many entries are in one column
Or do I need to see how many pivots there are
And for the nul space would it be the number of rows?
um, that was for Col(A)
Sorry I mean to say number of columns for the nullspace
ah ok. yep that would be correct
So the nullspace the and row space would have the same dimensions?
Because wouldnt the row space also have the same number of entries as the number of columns
nope, the dimension of the row space equals the dimension of the column space.
But when looking for like the vectors that span the rowspace wouldnt you reduce the matrix then look at the rows and then the rows become vectors
you do row reduction on the transpose of A and count the column pivots of rref(A^T) to compute the row rank. the proof that row rank = column rank isn't exactly trivial though
I see
I have not been doing rref on the transpose which makes sense why I was getting thinks wrong
Okay thank you
np
how do i go about proving that the eigenvalues of an orthogonal matrix is +/- 1
can someone give me a hint how to start
Hint: you should probably use the fact that any matrix A has the same eigenvalues as A^T.
oh that's a new fact that i don't know
I don't think that's necessary to know for this problem
Its just the first way I thought of doing it.
I'd just start from the eigenvalue equation Ax=lambda x and try to compute the inner product
the question includes a hint
"consider the norm of Av"
v is the eigenvector i guess
i do Av = lambda v and idk what to do yet
do i norm both sides?
yeah multiply it by its transpose on the left
v = A-1 lambda v
Merosity:
this is what I had in mind
yep now keep simplifying
yup it's just a scalar
thanks
you're welcome
don't forget to reason out that the reason you can divide by v^Tv is because eigenvectors are not 0
hm, I would have just done $Q^T Q v = Q^T \lambda v = \lambda^2 v$ and since $Q^T Q = I$ and the only eigenvalue of $I$ is 1, we have $\lambda^2 = 1$.
kxrider:
oooh interesting solution but how did you get lambda^2 v?
Q^T and Q necessarily have the same eigenvalues
oooh
the reason I mention that bit about eigenvectors not being 0 is because a very similar proof can be done to show that different eigenvalues of an orthogonal matrix necessarily have orthogonal eigenvectors
just work it through with Av=lambda v and Au = mu u instead
mu != lambda
hmm, actually, what I did might not be good. I assumed that the eigenspaces of Q are the same as the eigenspaces of Q^T. I'm not sure that is easy to prove... Its false, disregard the stupidity above
is I and -I "diagonal orthogonal matrices"?
well what conditions do they need to satisfy to be that?
i guess so
they're obviously diagonal, but orthogonal?
i guess all the column and row vectors have to be orthonormal and every pair of vectors is orthogonal
yeah i guess they are
I think they need to be unit length too
yeah
i see
$P=\frac{vv^T}{v^Tv}$
Merosity:
Anyone able to help with this
@honest notch
Still looking for it?
yup
,w row reduce {{-6,-3,24},{8,5,-34},{-3,0,9}}
,w row reduce {{-6,-3,24,a},{8,5,-34,b},{-3,0,9,c}}
There, Wolfram has it under the assumption
damn that is not what i got
im not sure how they assumed c either
5x + 3y - 2z = 0, sry
The bottom right most entry was
(5x + 3y - 2z) / some denominator
Meaning the bottom row reads
0 = (5x + 3y - 2z) / some denominator
Wolfram realized the form I was using and made it an assumption
Can someone verify the answer for the row space? My row-echelon form matrix is
1 4 5 6 9
0 1 1 1 2
0 0 0 0 0
0 0 0 0 0
Shouldn't the basis for the row space of A be {(1 4 5 6 9), (0 1 1 1 2)}?
Oh wait, is the basis for row space not unique?
Ohhh so both are correct?
i can't say without checking explicitly
Ah OK. Thanks anyway!
,w (3,-2,1,4,-1) - 3 * (1,4,5,6,9)
yeah you're all set
,w row reduce {{6,11,-4,a},{4,9,-1,b},{-18,-38,7,c}}
I'm supposed to analyze gausselimination in matlab using backslash/inverse(a)*b for 4 different files (with different sizes of N). Using this code:
and then fill in the times in a table like this
I've done that, but then they ask When N increases with a factor k, how is the runtime expected to grow according to the theory? Does it always line up with the theory? why not?
And I'm like.. what theory.. we havent read any theory about that i have no idea what theory Im supposed to compare it to
Whats the difference between decomposing a vector and projecting it? Assume we are projecting the vector onto the basis vectors/unit vectors.
I read somewhere that the components of a vector are just scalar multiples of the unit vectors. Whereas a projection of a vector onto a second vector is the component of the original vector in the direction of the second vector. Is this correct?
whats a good method to learn the cross product
Decomposition refers to writing a vector as the linear combination of other vectors, typically a basis
The projection that you described is an orthogonal projection
each term including the magnitude of that component and the unit vector?
?
You can decompose your vector such that each term is some multiple of the unit vectors
For example $\begin{bmatrix}3\2\1\end{bmatrix}= \begin{bmatrix}3\0\0\end{bmatrix}+ \begin{bmatrix}0\2\0\end{bmatrix}+ \begin{bmatrix}0\0\1\end{bmatrix}$, then the first term is the $x$ component, second term is the $y$ component, and third term is $z$ component
Whoever:
so the components are scalars multiplied by basis vectors?
Yes
But there are many basis for R^3, so you can choose any other set of basis vectors
And yes it can be subtraction when the magnitude is less than 0
But there are many basis for R^3, so you can choose any other set of basis vectors
@pallid rampart you are referring the unit vectors in different coordinate systems?
No
A basis is a set that is linearly independent and spans the space
But (1, 0, 0), (0,1,0), (0,0,1) is called the standard basis
You can write each vector as the linear combination of basis vectors
Uniquely
Well if you havenโt seen this donโt worry about it
But your original understanding of projection is good
oh ok
well i have seen vectors written as a combination of basis vectors (and i use them)
ok so whats the diff. b/w scalar projections and vector projection? And also b/w scalar projections and decomposition
So here
We are given vectors a and b
Scalar projection of a onto b refers to the length a_1. The orthogonal projection (sometimes just projection) of a onto b is the vector a_1. The decomposition of a refers to writing a=a_1+a_2
so we could think of y-component of the vector as the orthogonal projection onto the y-unit vector?
sorry for the late response, but is the scalar projection a vector?
@forest trail Would it not be the case that the scalar projection be a scalar, as opposed to being a vector?
Ok lemme say it again: orthogonal projection of a onto b is the vector a_1; the scalar projection is the length of vector a_1.
In this section we will look at another method for solving systems. We will introduce the concept of an augmented matrix. This will allow us to use the method of Gauss-Jordan elimination to solve systems of equations. We will use the method with systems of two equations and...
no im aware of how it works
im asking for the operations that need to be applied in order to solve
there are MANY ways to row reduce that matrix. they will all lead to the same rref
paul has examples w/ solns
not this specific one
the 2nd line immediately gives part of the solution. you can use that to backsolve the rest
6:40 PM] dlp: it's not even in rref but it is solvable
i know
but i wanted to see it in rref
i linked you an rref calculator
also, this isnt rref?
that is the rref calculator
click the option "Reduced"
thank you
how are you suppose to know what the latent dimensions are we compute the SVD
like how do we know what the singular values are attributed too
Are the components of a vector {the part in bold => [45i + -56j]} a scalar or a signed number? From what I've read, magnitude are always supposed to be positive yet we have things like -2i or -9j. Does the negative here correspond to the magnitude or the negative of the unit vector (the negative of the unit vector would thus indicate opposite of the regular direction of the unit vector).
Are the things stated here true (https://farside.ph.utexas.edu/teaching/336k/Newton/node153.html) ? Especially the last paragraph.
a scalar or a signed number?
"scalar" is just a fancy word for "real number"
scalars can be negative just fine
and yes, the entries of a vector need not be scalars
we can consider, for example, a vector space where vectors are elements of the set ${\begin{bmatrix}x\end{bmatrix} \mid x \in \bR}$ but the scalars are all from $\bQ$
Namington:
this would be called "the vector space R over the scalar field Q"
and we could do the same thing for, say, R^2 or whatever
where the vectors are from R^2 but we only consider scalars from Q
this is formally a different structure from "standard" R^2
tbf Iโd say then that the โentriesโ of the vector would have to be wrt a basis over โ (which of course is kinda hard to write down)
(for some very large value of โkindaโ)
Could someone explain exactly how one arrives at the basic matrix for rotation about the y-axis? I wanted to use the matrices to help with me rotating an object in a program I'm working on. I've developed a basic understanding of vectors and matrices with the help of 3Blue1Brown's video on Linear Algebra.
I've worked out/understood exactly how one arrives at the basic matrix for rotation around the z-axis and the x-axis (and verified it with Wikipedia) but for some reason that I don't understand yet I keep getting the matrix for rotation about the y-axis as the image I attached below whereas Wikipedia shows the same thing apart from the location of the negative sign.. I just have no clue how I keep getting a different answer for rotation about the y-axis but I get it correctly for the rotation about the x and z axis.
(I might be doing something blatantly incompetent but I would greatly appreciate it if someone points it out to me)
note that, when rotating about the y axis, a 0 degree rotation represents being aligned with the z axis
and as that increases, you mvoe counterclockwise towards the x axis
this might screw with your intuition a bit, since if you try and visualize this as polar coordinates/using trigonometric intuition, this means that the x axis is the "vertical" one
I need help with b
I made a matrix with columns for a, b, c, d, e, but the RREF doesn't make an orthonormal basis for the rows or columns
For part c can I just treat the columns as vectors and add them
sure
some help with Linear Programming?
here's the problem
so here's some system
Ax <= b
x >= 0
typical right?
Given that A is integer matrix and also for each integer vector b the solution (must be some polytope union right) is also integer prove that A is totally unimodular
I know what totally unimodualr is
aaaand its close
must be very easy
buut
my thoughts
maybe I can look at some specific b's such that Ax = b (solution of that) will be vertex of that thing...
basically i should prove that A is a bijections from Z_n to Z_n right?
idk if this is the appropriate place to ask but I have a question about Legrange polynomials
if I have a (7,6) matrix, augmented with vector v, can there be one unique solution?
like if I have a leading 1 in 6 of the rows with a row of 0's at the bottom, does that still have one unique solution?
No, there can't be. A non-square matrix can't have an inverse @dry spear
Oh wait, unless you're counting the augmented part as another column
any suggestions?(
The transformation is just taking a derivative so any constant would be in the kernel right?
Yes
What about the spanning set, wouldnt be all real numbers or how would I denote that
The question asks to find a set of polynomials that spans the kernel
Technically the set of real numbers does span the kernel, but there are better answers
How would you find the set of polynomials that span the kernel?
There is no the set
Any constant polynomial will span the kernel
Well
Non zero constant polynomial, that is
Right I get that
Im not sure how to write that though
Or can I just word it like that
You would just say
I mean is there a proper notation I can use
ughhh
idk
but from what I've seen you can write
The set $(1)$ spans the kernel of $T$
Whoever:
Whoever:
Can anybody help me understand this?
I think it's true
because the orthogonal component of the column space
is the null space of the transpose
and using A^T A x = A^T b
it would be 0
@limber sierra i read that scalars are invariable for coordinate system transformations whereas the vector components are not? ( <---- this seems to be true since for certain coordinate system transformations, the magnitude and direction of the vector must be preserved. But since the coordinate system has changed, the components will also have to change to preserve the original magnitude).
Sure, changing coordinates is just changing the basis
So vector components cannot be scalars then?
er
the set of scalars has to be a subset of the set of valid entries within a vector, assuming youre defining scalar multiplication conventionally
since $\lambda\begin{pmatrix}1\1\1\\vdots\1\end{pmatrix} = \begin{pmatrix}\lambda\\lambda\\lambda\\vdots\\lambda\end{pmatrix}$
Namington:
i.e. if something can be a scalar, then it can also be a component of your vector
the relationship doesnt necessarily hold the other way around, but for "common" vector spaces like Q^n, R^n, and C^n it does
well there's a slightly different kind of convention taking place that I think he's reading about
" scalars are invariable for coordinate system transformations whereas the vector components are not"
Q^n
common
here scalars meaning rank 0 tensors and vector components being rank 1 tensors
this is Qpression
also mero i have never seen that definition beforoe
does that even work as a definition
that's why I chimed in to help out
well apparently you know more about bad lin alg conventions than i do
in that case
haha it's more of a physics thing
like for example if you're standing at a point of space you can measure temperature (scalar) and look at wind velocity (vector) and look at the components of this vector in some chosen coordinate system
your temperature doesn't depend on the coordinate system, so changing coordinate system will leave temperature unchanged while vector components will change
which is what @forest trail is talking about
ah okay, i getcha now
i mean, i think my statements still hold then, but admittedly theyre less helpful
since the scalar field then is just R
yeah I think the ambiguity should be cleared up in whatever they're reading at some point if they read more closely at their text or whatever anyways lol
the reluctance of elementary computational linear algebra courses to talk about scalar fields other than R forever confuses me
like, thats one of the more useful/applicable takeaways from the abstraction that linear algebra provides
being able to consider what happens when we restrict scaling behaviour to a subset is very useful in, say, computing
probably far more useful than the adj formula for the inverse or whatever
/rant
freudian slip
but yeah inverses are bad computationally, it's cheaper to do row reduce the augmented matrix every time I believe
real chads define the determinant as the only alternating multilinear map satisfying blahblah
and do all their proofs based
idk I don't implement this kind of stuff so I wouldn't know lol
in a similar vein, i do all my calculus by considering dedekind cuts
In the study of geometric algebras, a blade is a generalization of the concept of scalars and vectors to include simple bivectors, trivectors, etc. Specifically, a k-blade is any object that can be expressed as the exterior product (informally wedge product) of k vectors, and ...
lol excellent
Thank guys, tbh with you, i'm not reading a linear algebra text specifically rather i'm doing physics (on my own, for pleasure and olympiads, mainly the International Physics Olympiad (IPhO)).
The doubts I post here just come from the questions I do in my physics book. So should I read a maths text side-by-side?
(I know Calc. I, i've read that we should go single var. Calc ---> lin. Alg. ---> multivar calc.) Or should i just post questions like this/learn things when I need them physics and not necessarily learn all of math (but I love maths!)
yeah what you're doing seems fine, just keep in mind there's some slight differences in words sometimes
doing linear algebra and multivar calc will be inevitable, the sooner the better
the set of scalars has to be a subset of the set of valid entries within a vector, assuming youre defining scalar multiplication conventionally
@limber sierra What would be the valid entries within a vector? And why would we need to bring scalar multiplication here? Is it because the only way (at least what i can think of) that scalars directly relate (by directly i mean there are no "in-between operators" like dot product) to vectors by multiplication?
The thing that confuses me is that some people the components of a vector are scalar multiples of the unit vectors, some say they are real numbers but not scalars (Check the last few paragraphs of this link-https://farside.ph.utexas.edu/teaching/336k/Newton/node153.html) and you say they may or may not be a scalar.
Do I repeat my question if it wasn't answered and drowned or ...?
Yeah
some help with Linear Programming?
here's the problem
so here's some system
Ax <= b
x >= 0
typical right?
Given that A is integer matrix and also for each integer vector b the solution (must be some polytope union right) is also integer prove that A is totally unimodular
I know what totally unimodualr is
aaaand its close
must be very easy
buut
my thoughts
maybe I can look at some specific b's such that Ax = b (solution of that) will be vertex of that thing...
basically i should prove that A is a bijections from Z_n to Z_n right?
Anyone know how to go about answering this question?
From what I learned the combinations of u,v,w will create a new vector b which lies in the same plane as u,v,w. And I can solve for b if b lies in the same plane as u,v,w. To check if columns lie in the same plane you have to find the combo of the columns that add up to zero. I am unable to find any combo that will add up to b being vector [0,0,0]
Maybe the planes are parallel and do not intersect. But in 3D planes can be in trouble without being parallel. You may need to move it up one axis so it aligns at an intesection. But uh idk how to integrate this knowledge to this triangular system
It seems the columns are independent as the first 2 columns on the left do not add up to the columns on the right.
Doing row and column picture in 3D seems to tedious a task and there should be an easier way?
I'm really lost as to how to answer this question. Its from Gilbert Strang Linear algebra and its applications 4th edition (Unfortanely can't find teachers solution so I only have odd numbered solutions)
Can someone steer me in the right direction?
i'm not going to read your essay above, but you should start from the bottom in a triangular system
you're trying to find the column [u v w] such that this is true,
you already know w = b_3
now go back up and solve for v, then back up again for u
Hi could someone give help me out with these two problems? I'm assuming i'm meant to use the projection equations but I'm not sure how to go about doing that
@forest trail that link is assuming the vector space in question is R^n
which is probably because its audience is introductory physics students
vectors from R^n can indeed only be composed of real numbers
in actuality, the structure of a "vector space" is far more versatile than this
but thats a side point
in any case, the point is: scalars and vector-entries are fundamentally different "things", but in the context you're currently working in, they're compatible
I found there's a theore sorta of to the opposite side of what I'm trying to prove
but it seems easier too
doesn't give me a lot of hints
Assuming W is a subspace of V, why is it that $\dim(W)+\dim(W^{\perp})=\dim(V)$
nix:
Well, you can show it by taking basis of W and basis of W^perp and showing its a basis for V
knowing that each vector v in V can be written as a sum of vectors v_1 and v_2 from W and W^perp respecitvely you can see that 'basis' spans V
Need to show linear independence
Right the projection theorem. The problem is that I'm trying to explain the 'why' to a student I'm tutoring.
Is there some intuitive reason? Or is it just how it be
I always thought about W^perp as like kinda complementary vectors idk, I dont remember it that well but there was an intuition for it for sure
Or like, knowing that if two vectors are perpendicular then they are linearly independent, which is kinda 'visible'
in any case, the point is: scalars and vector-entries are fundamentally different "things", but in the context you're currently working in, they're compatible
@limber sierra what are vector entries? and by "compatible" do you mean interchangeable?
vector entries are... numbers in a vector
i.e. each individual coordinate
and not quite "interchangeable" since they behave differently
but they can all be real numbers.
does anyone know how i can find, p, the polynomial coefficients of Lagrange by using linear algebra
i thought doing x\y_dot might work
mine or mortex's ?
yeah
Where both Ds are different matricies
does this not make you thonk
....
Anyway have you got question 8?
my answer was that it wasn't diagonalizable
,w eigenvalues and eigenvectors of {{1,0,0},{4,1,-4},{4,0,-3}}
its not diagonalizable is it
P =
[0 1 0]
[1 0 1]
[1 1 0]
D =
[-3 0 0]
[0 1 0]
[0 0 1]
You can kinda read the details off the eigensystem there
P^-1 would just be P with a -1 symbol above right?
P^-1 is P's inverse
Oh boy you're too late in the course to not know what an inverse is. Get that one fast
,w inverse of {{0,1,0},{1,0,1},{1,1,0}}
oh you meant this
We can always write
$\vec{v}=[\vec{v}]_{E}$
where E is the standard basis
nix:
We want a matrix which translates this coordinate vector into in terms of the basis B.
$P_{E \to B}[\vec{v}]{E}=[\vec{v}]{B}$
nix:
Use the fact that $P_{E\to B}^{-1}=P_{B\to E}$
nix:
Because finding $P_{B\to E}$ is really easy
nix:
@half ice i have two eigenvalues that are the same for question 9, would that make it not diagonalizable?
my eigenvalues are 1,1, and 3
What is the nullity of $A-1I$?
nix:
ive only found the eigenvalues so far
Because that will determine whether or not 1 has a geometric multiplicity equal to it's algebraic multiplicity.
It's possible to be diagonalizable with repeated eigenvalues if they are not defective.
okay
so i would make sure that the AM and GM are equal to each other
if they are i'd diagonalize and if not then i'd stop
so nobody has any clues?
@low plank A will be diagonalizable if A-I has a nullity 2
Because then the eigenvalue 1 has two eigenvectors
If you have fewer than n eigenvectors for an nxn matrix, it is not diagonalizable
<@&286206848099549185>
this needs proving?
do you think its obvious?
it does to me
Can you explain?
suppose there is a vector v in the solution set, Av = b, multiply A^T both sides
still holds
Sure, that shows that every solution to Ax = b is also a solution to A^TAx = A^Tb
But what if there are some solutions to A^TAx = A^Tb that aren't solutions to Ax = b?
OOOH
what i showed is just the solution to Ax = b is a subset of a solution to A^T Ax = A^T b
can i prove that the inverse of A^T exists
nvm
who said A^T was square
does anyone know why u is not [ 3, 1] ?
fully solve the system (A-I)v2=v1 instead of picking out one solution @novel ether
let v2=(a,b). from the 2nd row of the augmented matrix of (A-I)v2=v1 we have a-2b=1, a=2b+1, v2=(2b+1,b). you chose to let b=1. the book chose b=0
Hey guys, does anyone here know why making a matrix sparse makes it a lot faster to process compared to LU factorization? The bigger the N the more time you win with Sparse matrix
Got a presentation about my assignment in one hour and I still dont get it
how do i start working on this one?
i was thinking suppose v4 can be expressed as c1v1 + c2v2 + c3v3, then i did (v4 . v4) = (c1v1 + c2v2 + c3v3) . (c1v1 + c2v2 + c3v3). tried to show that right hand side can't equal to 1 but everything got messy and in the end idk what i'm doing
@fringe pasture what do you mean by processed?
I was supposed to make a table of runtime solving gauss elimination (backslash on matlab) on a big system matrix, I did, and now I can see that making the system sparse is faster than using LU
Gles means sparse
the bigger the N (eiffel) the more time it saves compared to LU
cant find any way to explain why
so you solve a system of linear equations in matlab with sparse vs non-sparse matrices?
yes
one sparse, and one just using LU factorization
and the left is just solving without either (Naiv)
regular gauss
well, gauss algorithm will always take essentially the same amount of time
no matter the matrix
and if given a sparse matrix, the pivoting and whatnot would in general create a non sparse matrix
not sure which algorithm you are using to solve with sparse matrices
but in general there are better available algos for them
than just gauss
x = A\b its builtin matlab function
then i would assume it does something smarter
like e.g. performing a QR decomposition via Givens rotations performs better on sparse matrices
First one is x = A\b, second one is [L.U] = lu(A) first and then backslash, and then last is making A = sparse(A)
because you only have to get rid of the nonzero entries
well ok, not sure how the builtin matlab functions work
or if there even is a way to find out
but like in general when you do a decomposition, you want to keep sparseness
because that keeps down computation time obviously
and gauss algo does not do that
so use better algos
But its so weird
Because the question is, which modell saves the most time and why
So i have to answer why either LU or sparse saves more time with backslash
and in the assignment it also says that Matlab uses gauss when you do backslash
so since every element in U is also in V, cannot I literally take the same mapping function that maps U to W and use it to map V to W. Thus for every element u in U T(u) = S(u).
what if you have a proper subspace U of V? then you wouldn't know how some elements of v in V, v not in U would map to W
U can be smaller than V, so you need to define the mapping for elements in V-U such that linearity is maintained
sounds like it'll work
ok tyvm
let V = R^2, U be the x-axis, and S be any nonzero map on U
i apologize
your construction would have T mapping everything off the x-axis to zero
will i get ban from being wrong so many times
but then T(1, 1) + T(1, -1) would not equal T(2,0)
i don't think so
you'll just get me saying "big wrong"
every big wrong you say to me i'm learning somethin new
i'm somewhat a mister positive myself you see
thats the spirit pub 
everytime she says big wrong you're closer to getting the big wrong role
tis the price to pay
Hey guys, can I get a hint on where to start with this?
I've tried googling but only the derivation for a matrix with full column rank shows up
transpose and then apply that derivation

or in other words
apply the derivation you found for A^T
thank you I'll give it a go
i like matrices its too ez
๐ค
Write V=U \oplus K for some K (K will be the orthogonal complement I think), then every v can be written as v=u+w, where u is in U and w is in K. Then define Tv=u
@storm python @potent totem
Oh W exist because V is finite dimensional
i.e. extending a basis of U to a basis of V, and the extra vectors will be a basis of W
Yeah
If an element is in K, then it gets mapped to 0
Oh shoot W is already used
I donโt think the function will be convex
@limber sierra could you accept my friend request on discord so we can continue this discussion in DMs? I would like to have all your responses collated so I can reference them later. Here in this channel, i have to constantly scroll up.
Maybe write them down yourself as notes
@pallid rampart yeah thats what i want to do.
What's preventing you from doing so?
det(kA) = k^n det(A) where A is n by n
but why
Many ways to explain this
write kA = k*I*A and take the determinant of kI which is an nxn matrix with k on the diagonal
idk if that answers "why" necessarily
Intuitively since the determinant is the volume formed by the unit vectors under the transformation represented by the matrix. If each unit vector is multiplied by k, then the volume in n dimension will be multiplied by k^n
Ig thatโs intuitive justification
how do I find the inverse ?
I'll let A' represent the inverse. Multiply both sides by A':
A - 6I + 5A' = 0
A - 6I = -5A'
A' = 6/5 I - 1/5 A
@kindred oxide
why do i keep getting cucked
to get the matrix of A coefficients a0... a_m-1 would i have to x\y where x is the m-1 x m-1 matrix and y is the column vector from y0 to y_m-1
sorry if i wasnt clear when asking lol
ok no one cool..
I don't think there's enough information to answer this?
I think the interpretation is that e_1 and e_2 generate the nullspace,
but then T(e_3) would be the answer. but that could be arbitrary
Oh I see, that is the null space just in this case
heh. I think they mean : the null space of a known but undisclosed linear map T is ...
Then:
T[x, y, z]
= T[x, y, 0] + T[0, 0, z]
= [0, 0, 0] + [0, 0, c]
= [0, 0, c]
Oh wait I can't justify line 2 to line 3
what about $ T = \begin{bmatrix} 0&0&2\0&0&-3\0&0&4\end{bmatrix} $?
Alek:
the last column is totally unknown
Nice counter example, there's not enough info to say anything about [a,b,c]
Trying to understand this Gaussian_Elim.py I found from https://gist.github.com/num3ric/1357315
I don't quite understand this double for loop where it loops through the first equation and...
No wait A is a matrix of equations it seems
I found a more beginner friendly code here but I don't quite understand how eliminating columns work here
https://github.com/ievans/GaussianElimination/blob/master/gaussianelimination.py
I think I'd need to write my own GaussianElimination script based off
I feel like I am missing some major concepts when looking at example scripts online
I found this vid on Youtube haven't seen it yet tho https://www.youtube.com/watch?v=ZDxONtacA_4
In this tutorial, the basic steps of Gauss Elimination (or Gaussian Elimination) method to solve a system of linear equations are explained in details with examples, algorithms and Python codes. Gauss elimination (after Carl Friedrich Gauss, 1777-1855) is a the basis of all o...
so are you trying to understand gaussian elimination programs when you don't know how to do it by hand?
I know how to do it by hand but I only know the method right now that involves using the elementary row operations
i'd recommend getting some practice row reducing actual matrices first
thats exactly whats going on here
like lets use your second code for example, the key thing here is the bounds
note that, due to how the bounds are changing
it's progressively making the matrix upper triangular
for the first column, when col = 0, it iterates through range(0, len(m))
i..e through ALL rows
but then for the next column col = 1
it only iterates through range(1, len(m))
and then for the nex, through range(2, len(m))
and so on
observe that it's essentially starting by
reducing the first column
and then the second
and then the third
and so on
since once a column is fully reduced, it can basically be ignored.
it'd probably be helpful to trace the execution of the algorithm on pen-and-paper
draw a 3 by 3 matrix and try and follow along with it
I agree. I wanted to do that as you were explaining the steps and I realize that may be extremely helpful way to break it down. I think doing that will help me visualize it better too. Thanks for the suggestion
I think I shall do that first and then come back with further questions if I have any after that
I can be beneficial to draw the "shape" of the matrix as you expect at each step for a generic example
Currently my understanding of Gaussian Elimination feels too 'aribtary' on what elementary row operations to choose in addition to what pivot to choose
well, the key insight is that it doesn't really matter
Probably becasue its a beginner level's introduction but it feels like I just 'eyeball' that the first row can be multipled to be subtracted from second row for example
I am baby
like some orders for gaussian elimination end up executing "faster"
but
any valid order will work, as long as it's eventually reducing rows and columns to the desired form
the algorithms you gave do a very "naive" approach
they dont try and optimize at all, just go through the simplest order
which is fine
[since after all, trying to optimize takes more computational time, so for small matrices its often not worth it]
I chose to find a naive approaches on purpose as I am still a beginner to the concept
As my own personal homework wanted to write my own script with numpy that visualises the naive Gaussian elimination so I can get better understanding
I usually recommend ignoring pivots when first learning the algorithm
That's what I am doing yes 
Your operation above looks good.
I should probably solve a few more by hand too to better familiarise myself with the algorithm but I noticed I take a fairly long time to do so. I guess more practice would lead to better accuracy and speed
I wouldn't call it "eyeball"ing. It's division: what number t satisfies t*(1) = 2 where 1 and 2 were the numbers leading your rows
Yeah I was about to say that
can someone help me with this
I really recommend learning how to do this algo by hand, yeah. It's not the only important Linear Algebra algo, but almost any question in Lin Alg can be answered by some smart (but sometimes confusing or complicated) application of it
But occasionally it seems I can do R2 - (1)R1 sometimes if it satisfies the condition
And sometimes it seems I need to multiply both equations
Yeah I wanted to write a script in order to better understand how to solve it by hand but in hindsight I'm putting the cart before the horse there...
Multiplying both equations is always going to be optional. Preferred, often, if you want to avoid fractions in your hand calculations
Also, there are some extra considerations that come up with a (good) implementation of this algo for computers. Since computers represent decimals using a finite number of places, extra things can go wrong
That honestly gets pretty tricky in general
I read about how LU Factorisation is preferred to Gaussian for as computer due to floating point errors. I didn't fully understand it tho
LU facto.. is harder. It also is a bit weird to do by hand, since it leaves some of the info implicit because it is trying to do something more efficient for computers
Hey Retro, what do you know about determinants? You're starting with $UU^T=I$ and you have to get the determinant involved
Alek:
Thanks btw for explaining stuff in an accessible and beginner friendly approach btw @vital swallow
No prob @daring solstice I tried ๐
I'm trying to self teach myself linear algebra to prepare myself for a CS degree in a year so I'm a fresh newbie to post highschool mathematics...
It's kinda fun tho in its own way
I quite like Math but never really was good at it in the past but hoping that can change with more practice and effort
That's a great time to get into Linear Algebra, actually! Some examples may not be accessible yet, but the general ideas are
And Linear Algebra's applications are astoundingly wide-reaching
I heard linear algebra doesn't have a prereq beyond high school algebra and it's a good starting point before heading into Calculus too
most of it won't come up until multivariable calc (Calc 3 at many schools) or differential equations. but the ideas are working in the background everywhere you look, once you know what you're looking for
I am using a mix of 'Linear Algebra: Step by Step (Kuldeep Singh)' and Jim Hefferson's Linear Algebra textbook for my self teaching materials. I like the former's accessibility but I do understand I'd need to get used to the latter's rigor eventually. I guess I am gonna use the latter book as a sort of 'New Game+' to use an analogy
I don't know Singh's. I think the other I tried using to teach a previous semester.
yeah. Hefferon, you meant? I like it, but I'm not sure it's super easy to read.
I still love Sheldon Axler's Linear Algebra Done Right, but that may be better as a New Game+ than a real intro
it's better if you need to know the theoretical stuff really well (which you do for a lot of areas of comp sci, and definitely for math) but it's still written at a fairly low level
but in your position, a more direct computational book is probably better
Singh's is the screenshot I posted earlier
looks something like this
I'd add that book to the list tho :D
Looks like a good choice, from that pic
Axler is for after this book, then. since you haven't taken more math, you'll want to know better what sort of things he is talking about
It's really accessible to me. The same extract from Jim Jefferson's on Gaussian was a bit trickier for me to parse
Yeah .. that's the book I tried to use
I think I am not familiar with this type of rigor yet and I do feel that I am missing some sort of pre-req in terms of experience here
I figured using a more accessible book for linear algebra and then going back to this one can help expose me to the rigor more and get used to this style of writing while already having a familiarity with the concepts
rather than tackling two things at once
Yeah. Hefferon is technical and "correct" all the time, at the expense of readability
read hoffman-kunze coward
Namington, that seems like a good compromise book between Hefferon and (apparently) Singh. is there anything that makes it especially good?
oh im joking, it's far more rigorous than both of the aforementioned texts
it's a mathematician's reference
i mean its not exactly a category theoretic approach to linear algebra but
oh. maybe my view is too skewed
hefferson is rigorous but its not particularly so i dont think
Singh is comfortable it's kinda comrpomises a bit of rigor but it makes the transition from high school to undergrad math really painless and if used as a stepping stone I think would be fine
I felt like Hefferon was a bit ..stuffy maybe.
There is an argument to be made that starting in the deep end may save time in the long run in exchange for extra effort at the beginning but I started my preparation early and have time
willing to spend more time to make the transition easier
Of course [lol], Manin's book is the gold-standard
I actually disagree a bit, Clementine
like
this is how hoffman kunze defnes the determinant
this is certainly the way an algebraist defines the determinant
it's also totally unhelpful if you dont want
full hardcore raw abstraction
hah. indeed I didn't scroll that far
its like defining C as the closure of R
[which is indeed what my intro analysis course did]
I mean .. it's the only good definition of the determinant ... but still.
yeah again, it's a reference text
this is the "correct" way to define the determinant
but maybe not the most helpfufl way to think about it
at least at an introductory level
I'll have to glance over it at some point before I teach the undergrad class again.. just to laugh about not using it, of course
i mean its a well-written text for
what it's trying to do
and i think it's good to have a sort of "baby rudin equivalent" for intro algebra
but yeah, i certainly wouldnt use this for a typical lin algebra course
or any linear algebra course not supplemented by extensive lecture notes, for that matter
Hey Retro, what do you know about determinants? You're starting with $UU^T=I$ and you have to get the determinant involved
@vital swallow so I tried to take the determinants of both sides and I got det(UU^T)=1 I don't know what to do next
Retro:
Compile Error! Click the
reaction for details. (You may edit your message)
So Retro, do you know anything about det and how it treats products or transposes? (since you have a product of U and U^T)
Tbh not too much
So the determinant has some awesome (and maybe tricky to prove) properties, like $\det(AB) = \det(A) \det(B)$
Alek:
I don't see how you could have possibly concluded (in a correct way) that det(U^2) = 1
This may be a simple question: if I know that the matrix Q satisfies
$ v^\dagger Q v = 0 $
Alek:
for all vectors v in C^n ... what do I know about Q?
by the dagger, I mean the conjugate transpose
must we have Q = 0 ?
I think it must be skew symmetric iirc
it's not necessarily 0, could be like a 90 degree rotation so that v^T and Qv are orthogonal
you can take the dagger of it to get that it's also satisfied by Q^T
ah of course. thanks. (bilinear forms are a weakness of mine)
I'm writing T to mean dagger
wait I must be
I am just wrong
for every vector v
obviously rotation can't work because it has eigenvectors with nonzero eigenvalues
if this has any eigenvectors, it necessarily must have 0 eigenvalues
otherwise you end up with that not being 0
@vital swallow
hm
to prove it's skew symmetric we can take the conjugate transpose, add it to itself
$v^\dagger(Q+Q^\dagger)v = 0$
Merosity:
for all v
but Q+Q^dagger is hermitian so in this case we know it's the 0 matrix
$Q+Q^\dagger = 0$
Merosity:
so it's $Q^\dagger = - Q$
Merosity:
past that I don't think there's much to be said
how does $v^\dagger (Q+Q^\dagger)v=0$ imply $Q+Q^\dagger=0$?
Alek:
because $A = Q+Q^\dagger = A^\dagger$ is hermitian
Merosity:
and earlier I said if it has eigenvalues, its eigenvalues are 0
ah yep
cool
thanks a bunch
yeah you're welcome
@vital swallow Q = 0
do you know the identity that allows you to write v* Q u in as a sum of terms of the form w* Q w?
if x1 = x2 = x3 = 0 in a matrix, what does that indicate?
what do these variables stand for
no Iโm genuinely asking that because those variables could mean anything
the notation isnโt standardized
I genuinely have no idea what you mean with them
oh
youโre gonna have to give me a definition
or a screenshot 
u know when we have a matrix of 3x3, we solve it. When we solve it, we find x1, x2, and x3.
and also โa matrixโ is extremely vague. what size does the matrix have for example
solve it as in find a solution to the equation $A \begin{pmatrix} x_1 \ x_2 \ x_3 \end{pmatrix} = \begin{pmatrix} 0 \ 0 \ 0 \end{pmatrix}$?
Sascha Baer:
(where A is your matrix)
if the only solution to that equation is the 0-vector then that means the matrix has full rank
like this matrix, and set it equal to <0, 0, 0>.
and solve it.
I've already solved it and the results are x1=x2=x3=0
but what does that tell use about the vectors that we used in this matrix?
it means the matrix has full rank
but I feel like if I just told you everything else that implied you wouldnโt learn a whole lot from it
btw watch 3blue1brownโs videos
I have this gut feeling youโre not really grasping what is behind these calculations youโre doing (I may be wrong, itโs hard to tell)
please. it's 1:30 AM. lol
Iโm not saying right now
if itโs 1:30 am for you, go to sleep
https://www.youtube.com/watch?v=fNk_zzaMoSs&list=PLZHQObOWTQDPD3MizzM2xVFitgF8hE_ab I feel like every linalg student should watch these videos
Home page: https://www.3blue1brown.com/
Kicking off the linear algebra lessons, let's make sure we're all on the same page about how specifically to think about vectors in this context.
Typo correction: At 6:52, the screen shows
[x1, y1] + [x2, y2] = [x1+y1, x2+y2].
Of cours...
they give a great intuition for the basic notions of linear algebra
things like what a matrix really represents, what its rank means etc
i knw what vectors are and how they are formed under differnt circumstances lol
itโs a playlist
I watched these videos after taking a university level course in linear algebra and still found them insightful
oh
i didnt remember the word coefficient
they are the coefficients
please. just tell me. I'm prepared to take notes.
Ax is a linear combination of the cols of A, with the coefficients being the components of x
if you solved Ax = 0 and found that x=0 is the only solution, then you have found that the only linear combination of the cols of A that sums to zero is the trivial linear combination, namely one where the coefficients are all zero
this is word for word the definition of "the cols of A are linearly independent"
@cold topaz
do you understand what i said in its entirety
Um
Orthoganility
Meaning when 2 vectors are perpendicular, right?
Meaning the angle between the vectors is 0
we call two vectors orthogonal if their inner product is 0
what's that?
Yes
inner product is the scalar product or dot product
Meaning cos theta = u . v / llull llvll, right?
sure, yes
that is the standard dot product
inner product is the . there
I accidentally read it as linear product, not inner product
definition of what angles mean depends on the definition of the inner product
So if u.v = 0, the vectors are orthogonal
ye
yes
perpendicular is a synonym to orthogonal
orthogonality is a generalization of perpendicularity
Oh
if your work in real vector spaces, it is synonymous
I suppose some people use โperpendicularโ to mean โorthogonal with respect to the standard inner productโ
whatโs your definition of perpendicular, loch?
i'd define perpendicular in terms of basic geometry
Two*
only in R^2
Iโve always used the words completely synonymously
btu I also just donโt use perpendicular
cause it takes longer to type
Oh
i would say the better term is "orthogonal"
and i would in most cases reinterpret perpendicular to orthogonal
Okay
I am making a lot of typos today
Anyways, thank y'all so much!
Ok i get it now
So orthogonal is if one of the vectors or both are zero vectors
But if they are non zero but their dot product is zero, they are orthogonal and perpendicular
Hey guys can anyone help me with a vectors equation?
you could try just asking
ok, where is the problem?
probably by applying definitions
what is the multiplication of vectors?
what is | |?
ok, so sm ghosted me
ok, what is the definition of | |, then?
It turns it to positive if its a negative
the question says its not the length of the vector
It determines its direction
what does that mean
the question says its not the length of the vector
can you show what the question says in its entirety
It's not in english
post it anyway
what language is it in
Hebrew
ok, this is gonna be hard then
Do you want me to post it anyway?
yes
@limpid vine you are not helping
okay so can you translate what the first two lines say
@true oar
Alright
The question I already posted above
This says that the | | doesn't mean the length of the vector
then what does it mean
absolute value
no, what's $|\vec{u}|$ meant to be if not the length of $\vec{u}$?
Ann:
what do you mean by "the scalar value of u"
I meant scalar
Ok so if the scalar value of u is -5
what do you mean by "the scalar value of u"
what's the "absolute value" of a vector
that's all fine
I KNOW WHAT THE ABSOLUTE VALUE OF A SCALAR IS
But what does it mean in case of a vector
that's what loch and i have been trying to find out FROM YOU all this time
well then nobody here can help you, unless they speak hebrew and can give an adequate translation of the problem
Alright then sorry to waste your time
sad
"and not quite "interchangeable" since they behave differently" @limber sierra
how do they behave differently? Is it that coordinates depend on coordinate system whereas scalars do not? Do scalars not depend on the coordinate system because they are from fundamentally different things called fields (these fields obviously dont depend on coordinate system). Also can the set of numbers in vector "entries" differ from the scalar field over which the vector space is defined? Like you said "vector space r^n over scalar field q".
Also earlier you said the set of scalars has to be a subset of valid vector entries.
Then you say anything that can be a scalar and can also be a vector component but not the other way around.
Shouldnt components be a subset of scalars in the second case?
(Also i read why we use the word scalar instead of number as scalars can be any set of numbers)
im having trouble understanding eigenvectors
what about them
how to calculate them
so you have an eigenvalue $\lambda$ for matrix $\mathbf{A}$, and to find the eigenvectors, you find vectors so that $(\mathbf{A}-\lambda \mathbf{I})\mathbf{x} = \mathbf{0}$
PorosInMyAshe:
@true oar I think you're mistaken. The |u| with the arrow on top means the length of the vector.
This is fairly standard notation; I have a professor from Israel who uses the same notation as everyone else.
I also don't speak any Hebrew, but it's written left-to-right, and I'm just going to give my best shot at deciphering it:
- Prove that if ||u|| ||v|| = ||u dot v||, then u = tv
- Prove the converse of 1
The rest idk
actually i thought some more about this
and it might be that | | is just any norm
and not the euclidean norm
so it might just be "not necessarily the euclidean norm / length, but any norm"
I tried some more and I think that |a| means the length of vector a but if its | |a| x |b| | it means the absolute value of the lengths multiplied
well, yes
It's M doing a T pose
can someone help me with number 2?
any time I'm stuck I try to just combine whatever I'm given
they give you A=PDP^-1 and they give you B=2I+A^2
I'd just try plugging that equation into the other to get started to see if that gets you any ideas
B = 2I + (P D^2 P^-1)
So without adding 2I, B should have eigenvalues 1 and 1
But idk if adding 2I changes that
we can be trickier
and write I=PP^-1
and factor it out on either side
$B=P(2I+D^2)P^{-1}$
Merosity:
2I+D^2 is a diagonal matrix
that means we have technically diagonalized it and we can see what its eigenvalues are very simply @meager bolt
Hm so one itโs eigenvalues should be 3 right
@quartz compass would it just be 2,3?
yep
hey all ๐ I think this is the right place to put this question, lemme know if not: if I have an absorbing markov chain with 5 states, is there anything special I need to do to find the foundational matrix once I've put it into standard form and found IOQR? the examples I've seen have been 4 states, so they end up making perfect 2x2 matrixes for all of IOQR and I'm uncertain if I can find F if I is 2x2 and Q is 2x3.
upon further exploration, my question boils down to: how do I subtract Q from I if they are of differing sizes?
can I just simplify I to a NxN array matching the dimensions of Q, as long as I place the 100%s in the right spots (down the diagonal)?
$A^TA = QA^TP^TPAQ^T$
KS42:
does anyone know how i can prove that
given Q and P are orthogonal
i know that P^TP cancels out to I
Hey, how's everyone doing?
@gray dust do u know how to do it
sry i'm too sick to do linalg
I'm doing good as well




