It would also be interesting to consider this from a graphical perspective. When the title of your video popped up in my list, I instantaneously thought of 4 simple cases (graphically). 1) A matrix that represents a rotation by x degrees can be the square of a matrix that represents a rotation by (x/2) degrees. 2) A matrix that represents a simple stretch by a factor of x can be the square of a matrix that represents a simple stretch by a factor of sqrt(x). 3) A matrix that represents a simple skew can be the square of a matrix that represents a partial skew (needs more discussion on this one) 4) A matrix that represents a simple, uniform expansion in every direction by a factor of x, can be the square of a simple uniform expansion by a factor of sqrt(x). It further occurs to me that the square-root of a matrix that represents any combination of #1 and #4 can easily be found (based on the expansion factor and degrees of rotation). I'm guessing there may even be some more graphical intuition here.... Maybe something to do with the eigenvalues and eigenvectors?????? Would be interesting to explore.
@@MathsLikeALegend If and/or when you do, I think the one transformation the OP forgot to mention are reflections. Well, and possibly projections, as well. Could be wrong, since I'm thinking of general transformations, not necessarily the square-roots of some transformation.
@@robharwood3538 Exactly. And the problem is they don't square nicely when stacked with others. So are some others I think. Those that represent rotation and uniform stretching can be stacked together, and are analogous to complex multiplication.
Hi! I've stumbled upon your channel and, while I've already gone beyond this level of maths, your style of teaching and making videos has been entertaining. Would you consider doing video about a more abstract topic like group theory? I may be a little biased, of course, but i do think it would be interesting. Of course, it would start by just exploring symmetries and symmetry actions, and you could link to, for example, the roots or unity you've covered in the past and invertible matrices and how they act like symmetries of the vector space structure itself. Consider it, and if you believe it to be not the level of maths you want on this channel (which i believe though not to be the case: everyone can reason about symmetry) then that's of course fine too :]
Thank you for the lovely comment, I appreciate it! :) Funnily enough, the very beginning of group theory is one of the things covered by one of the qualifications I teach, so I will make a tutorial video covering it at some point!! The content only covers what a group is, how to determine whether a set with an operation forms a group or not and also (the logical but very easy next step) of abelian groups. So it's definitely something that's on the list of things to do :) [no promises about how long until I get around to doing it though haha]
I am glad you think so! I am basically just trying to answer the things I am also curious about, so if anybody finds it interesting too it's a nice bonus.
Really good video! Being able to solve for the matrix X based on A, in f(X)=A is actually the main use case (in competitive linear algebra) for the normal form, for functions f that commute with conjugation (like polynomials, or the exponential function). The normal form of X uniquely determines the normal form of f(X), and if f(X) has the same normal form as A, then A=P⁻f(X)P=f(P⁻XP), for an invertible matrix P. You can even calculate the dimensions of solution spaces, which is useful when it is 0, because for these matrices A, AB=BA ⇔ f(A)B=Bf(A) for matrices B.
I love it. Classic example of a teacher having some fun with the class -or- a preview of what is to come ... And don't forget that when eliminating a square using algebra by taking the square root of both sides can lead to extraneous solutions. You need to check them to be certain. And how to do that is a bit of a mystery at this level as well. Great video! I thoroughly enjoyed geeking out with you on this topic.
Exactly! This video was actually created directly as a response to a student asking me about it in a lesson 2 weeks ago :) So I just used it as a good excuse to open the door to some new maths!
and yes! you are right about the square root part. In retrospect, that step is exactly why I have ended up not being able to analytically know which value of "a" goes with which value of "d". Another user (chaosredefined3834) in the other comments helpfully pointed out an alternative way I could have solved those simultaneous equations that would have solved the issue.
@MathsLikeALegend I tried both sympy with Python and Wolfram Alpha and both give a single solution. Great lesson for students: extraneous solutions are a true issue when taking sqrt of both sides.
4:52 oy, you already used that equation once. That's an easy way of messing up, even if it technically works here. Instead, substitute b=7c in the other 2 equations, solve for c^2 in each, then set those 2 equations equal to each other. (keeping in mind the difference between c^2 and the original c) At this point, you would have used every equation once. The number of variables=number of equations, as you should've checked before any algebra. So solve. 20:02 hate it when that happens.
I probably did not spend as much time as I should have to check for better ways but that was partly because I knew I was just using that part of the video to highlight why it's not a quick way of doing it and that either the diagonalisation or the formula are the better ways of doing it
Really great video, my friend. This is *way* better to learn *first* before delving into the eigen-methods later on. At least this can be used in many real-world situations before having to learn more-advanced linear algebra topics. I wish they'd taught me this in high school!
Taking non-integer powers of matrices is useful for animation blending, if the matrix represents a model or bone transformation for example. If M^0=I=no transform and M^1=target transform then M^t=intermediate transform at time t from 0 to 1. But I think most game engines interpolate the components (translation, rotation, scale) as vectors or quaternions and then create a matrix from these components.
Good to know. I always try to keep an eye on the general applications of maths topics so that I can indicate to students why we care about things, but it is always nice to hear more specific uses.
After getting a relation between b and c, You can subtract a²+bc from d²+bc and get d²-a²=8-2=6 You have (d-a)(d+a)=6, and d+a=1/c d-a=6c 2d=6c+1/c d=3c+1/2c 7c²+9c²+3+1/4c²=8 t=4c² 4t+1/t=5 4t²-5t+1=0 (t-1)(4t-1)=0 t=1, c=±½, d=±5/2, b=±7/2, a=-3±5/2 t=¼, c=±¼,d=±11/4, a=-3/2±11/4, b=±7/4
As someone who did their A-level mathematics in 1979 we did possibly more than is on the current curriculum but not much. We certainly didn't do square roots of matrices but it was interesting to see you working through. I have now subscribed for more mathematics.
Thank you for the nice comment! I really appreciate it. I hope I continue to make content that interests you. I generally release a video of this style once every 9 weeks.
Nice video. Eigen square root via the eigenvalue decomposition gives the most logical one but there are many. This ends up being very nice if you have a symmetric matrix.
Many thanks for this interesting video which opens a window to a fascinating field of mathematics. We might add that the eigenvalues of the matrix m = {{2,7},{1,8}} are 1 and 9, and that the general power is given explicitly by m^p = {{(9^p+7)/8, 7/8(9^p-1)},{1/8(9^p-1),1/8(7 9^p+1)}}. Examples m^(-1) = {{(1/9+7)/8, 7/8(1/9-1)},{1/8(1/9-1),1/8(7/9 +1)}} = {{8/9, -(7/9)}, {-(1/9), 2/9}}=1/9 {{8, -7)}, {-1, 2}} m^(1/2) = 1/4 {{5, 7}, {1, 11}} We can also study the exponential function of a matrix, as defined by the infinite series e^m = 1+ m+m^2/2!+m^3/3! + ... which gives Exp(x m) =1/8 {{7 E^x + E^(9 x), -7 E^x + 7 E^(9 x)}, {-E^x) + E^(9 x), E^x + 7 E^(9 x)}}
Thank you for writing a nice comment! You are right. I was weighing up what to include/not include and you might have seen that I acknowledged but skipped over the eigenvalues stuff in the middle of the video. I had originally planned to fully cover that approach as well but I could see how long the video was getting haha. Perhaps something for a future video one day.
Just for a fun fact, the same thing can be done easier with projector decomposition, where you express the matrix as the sum of an eigenvalue * the projector matrix of the corresponding eigenvector. IMO it's simpler that way
If you look later in the video I DO reference diagonalising a matrix (at 13:40 in the video) but after that, I then show an EVEN BETTER way than that for 2x2 matrices. See 14:18 onwards in the video.
I strongly believe diagonalizing the matrix provides much more intuition than doing a bunch of algebra. I don't think there is really much to learn in this video other than watching someone solve equations and count roots
I won't disagree about the benefits of diagonalisation. However, things to consider about the context of this video: A, the formula I show in the latter half of the video is obtained by diagonalisation. So that method is still playing a role in what I showed, even if only indirectly. B, I made this video for, first & foremost, my students (because one of them asked whether it was possible to do this action). Unfortunately, they do not know what eigenvalues, eigenvectors and other thing are yet. Annoying, I know, but the content I teach is decided at a national level (not by me). Therefore I am left with a dilemma. Do I just fob the students off by saying "oh don't worry about that as you will not be able to do it until you reach university."? well, no, because that is the whole reason I am making these videos, to actually solve their curiosity. Or do I try to teach them diagonalisation all within this short video? Well that leads me on to my third point, C, which is arguably, there are a lot of people who learn the process of how to convert a matrix into diagonalised form as just a set of mindless steps rather than thinking about why that works, so isn't that still the same net difference? But if I want to also combat that by going into the explanation of why eigenvectors etc DO help you diagonalise etc etc, that is going to become a much longer video. D, the whole point of the beginning section of this video is precisely to highlight the flaws in the mindless solving equations. Why did I show it even to begin with? It's because in my experience it's the method that people tend to attempt if they have not come across what diagonalisation is yet. I was trying to show in the video that I empathise with them trying that approach as I also tried doing it that way when I was younger but therefore wanted to point out why it was not the best way to approach it. E. Diagonalisation is not without flaws either. So therefore the stuff I do towards the end is important for dealing with that issue. So overall, yes, I do agree with the point you are trying to make, but also, I hope you can empathise with why the video has been made the way it has. :)
diagonalizing doesn't directly help (even if you can diagonalize, which you can't in the general case), because they are not orthogonal. This works for symmetric matrices: keep the eigenvectors, replace the eigenvalues by sqrt(eigval) [as long as all eigvals are positive]. If A= B E BT with B matrix of eigenvectors, sqrt(A) is NOT B sqrt(E) BT unless B is an orthogonal matrix (in which case A becomes symmetric)
As in the case for a solution of Ax = B, there is either 1) a unique solution, 2) no solution, or 3) and infinite number of solutions, related to the linear independence of the initial system.
I had not thought of looking at it that way, but yes. But arguably the interpretation as to why those are the possible options for numbers to solutions to AX=B is more intuitive due to it's geometrical link to the intersection of planes. Whereas I would interested to know if there is a nice way to geometrically interpret the roots of a matrix haha.
@@MathsLikeALegend Perhaps. In the typical sense of real numbers, the square of a real number S, when multiplied together, is geometrically represented by a square of area S and two perpendicular lines each of length sqrt(S). So perhaps there is a geometric planar representation in N x N (2 x 2 for example) space of a matrix where pairs of orthogonal planes with surface areas sqrt(S) complete a cube of volume S, but the dimensions appear to be off because we are talking about an area vs a volume. So perhaps the cross product of eigenvectors of length sqrt(s) with area S would work better?
I agree with you about the dimension seeming to be off, but equally, I do not have the answer for what could be done about it. Interesting stuff though :)
Hold up. From when you were doing it with numbers, you found yourself with a^2 + 7/(a + d)^2 = 2, and d^2 - a^2 = 6. Now, I agree that these equations look pretty annoying. But not because of the squared. I don't like that pesky (a+d)^2 in the denominator. And, when I look at this, I see a very nice trick to get rid of them. First, I'm going to multiply the numerator and denominator of that fraction by (a - d)^2 a^2 + 7(a - d)^2 / (a + d)^2 (a - d)^2 = 2 Next, I'm going to combine the two terms in the denominator by noting that a^2 b^2 = (ab)^2 a^2 + 7(a - d)^2 / [(a + d)(a - d)]^2 = 2 Next, I'm going to use the difference of squares formula: (a + d)(a - d) = a^2 - d^2 a^2 + 7(a - d)^2 / (a^2 - d^2)^2 = 2 Now, we know that d^2 - a^2 = 6. So, a^2 - d^2 = -6, and (a^2 - d^2)^2 = (-6)^2 = 36. That (a^2 - d^2)^2 is the denominator of our fraction, so let's plug that in. a^2 + 7(a - d)^2 / 36 = 2 Next, multiply through by 36 36 a^2 + 7(a - d)^2 = 72 Expanding out the brackets and joining like terms, we get 43 a^2 - 14ad + 7 d^2 = 72 Next, I have a d^2 - a^2 = 6 equation. This means that a^2 - d^2 = -6, or 7a^2 - 7d^2 = 42. Adding that to the above equation gives us 50a^2 - 14ad = 114 Multiplying through by 3 150a^2 - 42ad = 342 Now, multiplying our d^2 - a^2 = 6 equation by 57, we get 57d^2 - 57a^2 = 342. So, we now have two different ways of writing 342, so those are equal. 150a^2 - 42ad = 57d^2 - 57a^2 207 a^2 - 42ad - 57 d^2 = 0 Dividing through by d^2 gives us 207 (a/d)^2 - 42 (a/d) - 57 = 0. Solve for a/d, substitute back into a^2 - d^2 = -6, and you get a value for one of them, then use a/d to get the other.
oooooooo, I love that approach. Of course! I should have spotted that as funnily enough I helped one of my students with one of those type of a^2+5ab+6b^2 style equations the other day haha. That in theory looks like it would solve that uncertainty of the pairings. I will confess that I brushed over the solution to those equations when creating this video by just reusing the approach I had used as a younger man and did not revisit it/consider other approaches (because I knew i was going to focus on the formula for the square root later in the video). But therefore I appreciate your comment a lot :) If I make a follow on video, I will probably reference what you did (and attribute it to you) as a correction to what I did here if that is alright.
It can actually all be simplified to 6 simple equations: ad-bc = ±sqrt(AD-BC) ≡ δ₁,₂ a+d = ±sqrt(A+D+2δ) ≡ t₁,₂ A+δ = t*a B = t*b C = t*c D+δ = t*d These contain all the information, and account for all cases. To solve you find the δ's and t's, and for each option you solve the rest. If a t is 0 and the left sides are as well, you get an infinate family of solutions, and you can check the definition of δ and t for the constraints.
Yes, I debated whether to use that way of writing it or not. It makes it look less messy but then, if you having to define these variables at the beginning of the formula, for those referencing the formula for the first time, it then requires people to then go "oh what do those things mean again" and repeatedly cross reference it. But obviously the form you are talking about makes it easier to remember.
depending on the values of the eigenvalues, you can compute sqrtm(A) using matrix functional calculus, which involves calculating eigenvalues and looking for a solution of the form aA+bI (for 2x2, or aA^2+bA+cI for 3x3, etc.), and in the end the constants a,b are found by solving a system of LINEAR equations. The only "hard work" is in finding the eigenvalues.
Yes. I will openly admit to being flippant with defining things at the beginning of problems as I am often too impatient and want to get on with actually solving stuff haha. But you are right, and those definitions at the beginning are important for laying out what it is we are trying to find and what the "rules" are so to speak.
It is always interesting how math results in unintuitive things, like square roots of matrices, finite sums of infinite series, nonzero results from expressions that approach "infinity minus infinity", and so on.
yes!!!! I totally agree with you. I still get amazed by these results too, no matter how long I have known them for, not matter how long I have known the proofs behind them etc etc. It's all just so satisfyingly "neat".
hahaha. You legend! Thanks for the support. In return I will have to work hard to ensure I can create enough content for you to continue to binge haha.
When I saw this thumbnail I tried to solve the general myself before watching this video, and got to the formula you showed it. Pretty shocked it's that recent, I guess no one bothered, cause it was pretty straight forward. Anyway, patting myself on the back here
Indeed. A very useful tool! A bit annoying to write out if you have complex eigenvalues but with modern calculators able to calculate matrix operations so easily then it saves a lot of time.
I’m taking a course right now called Mathematical Methods in the Physical Sciences which is pretty common in physics curricula. We discussed calculus of operators and matrices, and the square root of matrices is actually pretty important! Any second-order time-evolution equation (d2/dt2) y(t) = -B y(t) can be solved by evaluating the exponentiation of the square root of the operator B y(t) = exp(-i sqrt(B) t) * y(0)
ohhh that is actually genuinely very interesting! The modules I ended up choosing during my degree ended up steering me away from the Physics-aspects of maths and so therefore I never got to be taught about things like this. Pretty cool.
Regarding the eigenvalues, eigenvectors and diagonalization, it will probably not be enough, since not every matrix is diagonalizable. In any case, in defense of these eigenvalues, I would argue that it is a much better time spent learning about them than these very specific computations for square root of a matrix, so I don't have any problem if teachers skip such computations. These eigenvalues appear almost everywhere in mathematics and in engineering, and have such an interesting structure and give much better intuition to such problems.
Indeed, which is why I could have quite easily made this video about 3 times as long talking about more of the methods haha. Each of them has a flaw and an advantage (such as solving the equations at the beginning being messy, but will always find every possible square root eventually; diagonalisation, which still can be quite long without a calculator and does not work for all matrices but can be applied to matrices with higher dimensions or the the formula I showed towards the end which is the quickest method by far, but only works for 2x2 matrices and does not work for the same matrices that diagonalisation does not work for) All in all, an interesting problem because there are so many ways of looking at it! :)
One way to visualize the case of infinite solutions geometrically treating the matrices as R2->R2 transforms... You can rotate the image any number of whole times and get the same result. In the "k" case in the video, this represents scaling by 3 in x and -3 in y, flipping it, and k=1 introduces a shear. But because it is flipped along y (mirroring it), repeated application will undo the shear.
In matrix calculus you often need A times Atransposed e.g. for a quadratic model function. Would this make life easier? Another simplification may come with using vectors first.
Using transposed matrices is certainly used as part of the method to diagonalise some matrices (which as I mentioned in the video is one of the main approaches for this stuff), although using transpose to do that is a trick that only works for symmetrical matrices. Beyond that, I do not know how transposing could be used (not because I'm saying it can't... I just do not know haha)
Get any Gram Matrix K. K = ULU' where U and L is an eigen-vector/value decomposition of the matrix. K = (UL^1/2)(UL^1/2)' UL^1/2 is your result, basically. And L^1/2 is easy to get because it's a diagonal matrix. You can also do it with any other kind of matrix, but it may introduce complex numbers. Non-square matrices are also possible, but then it's an svd decomposition instead of an eigen one, and it should probably be considered an extension of sqrt... Anyway....
Good question. It is something I will make a video on sometime. Short answer though: easiest to do it using the eigenvalues/eigen vectors/diagonalisation method I referenced in the middle of the video
Yes! :) multiplying by the inverse replaces the traditional role of division. This is because multiplying matrices gives a different result depending on which way around they were multiplied. So a blanket "Divide" is not specific enough.
At 5:31 there is no need to take square roots to get an expression for d in terms of a. Why not compute the eigenvalues and eigenvectors of the given matrix, write down the diagonalizing matrix and its inverse (if the given matrix is diagonalizable, if not a slight modification based on Jordan normal form can be used) and sandwich the square root of the diagonal matrix between them? That method works not only for 2x2 but any size matrix.
True haha. Somebody else earlier in the comments already pointed out a better way of solving those equations :) I will admit that I only included entire first section of the video with the simultaneous equations to illustrate that this approach is clearly slow and inefficient, which then shows why the methods mentioned later in the video such as diagonalisation (at roughly 13:40 in the video) or the square root of a 2x2 formula (see roughly 14:18 onwards in the video) that I show after that both seem much better in comparison! Therefore, I did not spend very long on considering the perfect way to solve the equations at the beginning because I knew I was moving on from it later in the video. sorry for the lazy maths though!
I am glad you enjoyed it! It interests me because it's a problem that seems so simple at first but then the more you explore it, the weirder it becomes.
@ I completely agree - I definitely didn’t expect there to be so many different possible numbers of square roots, I assumed it would just be like the square root of a complex number
yes, but two of them are synchronised, so that means when you pick the the + in one of them, the + has to be picked on one of the other +/- places as well or the formula does not work. and vice verse, if you pick the - then you have to pick the corresponding - . That is why I did not include the third +/- in the same overall equation (wrote is "S or -S" instead) so that you knew which one was independent of the other two. :)
ay Greg u know who this is. Just wanted to let you know that I miss having lessons with Joel, Hannah and you. Uni is fine but my lecturers just aren't the same. Thank you, I don't think I would have gotten the grades I got without your motivational speeches. I am also glad that this video took off and I wish you the best of luck for the future of your channel.
wheyyyyy. You are right, I definitely know who this is! Good to hear from you Justin! You got some really good grades in both Maths & Further Maths in the summer (and they were high grade boundaries for your papers so respect for that). I am sure that if you continue to have that motivation and determination that enabled you to get those results that you will achieve your career goals. That's really very kind of you to say, and I shall pass on your well wishes to Hannah & Joel too. I'm of course very happy with how this video is doing, but do not worry - I'm still just the same maths teacher that you know, still enjoying being in the classroom!
All the mathematical notation is done using microsoft equation editor haha. (instead of the usual choice of LaTeX). It might just be me lining things up badly because sometimes I have to have different parts of the notation as separate objects so that they can be independently animated. Or we could just blame microsoft. you choose hahaha.
that works when M is "close enough" to the identity matrix in some sense. trouble is that if you want to do the logarithmic method, you can usually apply similar calculation techniques based on the square root instead (in this case, power series)
@Errenium answered your comment very well. One of the main reasons I did not mention exponentials of a matrix at all in this video was because of the level I was trying to pitch the video at. However, also the aforementioned issue with the power series of the Log of a matrix restricts the usefulness of that as a method on a broader scale.
1 - I'm not suggesting that using power series is a practical computational technique, but only out of theoretical interest. 2 - I don't claim to know what I'm talking about, so regard my comments as guesses or questions. So would the comment "close enough to the identity" mean the absolute value of the determinant of M - I is less than 1, where I is the identity matrix? And if it is not, could we rescale M so that | Det (sM - I) | < 1, and then handle the scale factor s separately?
Ah fair :) We are all just explorers in the world of maths. Well, in which case my response would be: 1 - this is on the real edge of my knowledge so take what I say with a HUGE pinch of salt (I am not a university professor)...but.... 2 - That approach should theoretically work. I have not tried doing it that way though, so therefore I would not be able to comment on the accuracy of that approach. When using a power series to calculate anything numerically, the result is of course affected by how many terms of the series you are using AND any inaccuracies would be compounded if you used a power series to do BOTH the Log AND exponential calculations and then if you put a scale factor adjustment on top of that (to account for it not being originally close to I as you said - a neat trick though if it works) at the end I do not know if all of that might blow any initially small margin of error in to a big one by the end. 3 - therefore, I would be interested to know purely for the sake of curiosity if you try it that way, to know if it can lead to results that are close to it in any form (do not worry, I'm not saying that with the intention to steal your idea so I can make a video about it.) 4 - That is therefore why I am guessing that Errenium was saying that most of the ways for calculating exp or log of a matrix involves methods that could be used to calculate the square root in a more direct way, such as diagonalisation. But I found your suggestion interesting because I had not even considered that as an approach! :)
@@graptemys4186 You know, I hadn't thought of the scaling either. I'd bet you're right, though. I think we'd need to be a bit more careful about it in some cases: scaling down by the largest magnitude of the eigenvalues or even scaling with a diagonal matrix of the inverses of the nonzero eigenvalues. I'm just speculating-I don't want to imply this is an area I'm very familiar with. But I am very interested. I hope if any of us finds something they'll share with the others.
Good question. As far as I am aware, it does not fit into the fundamental theorem of algebra because that is only for univariate polynomials. As matrices multiple elements, arguably those are introducing extra variables (kind of, kind of not) that mean that it does not have to hold anymore. However, as always with maths I have to caveat that by saying "as far as I am aware" as there always might be an area of maths that I am not aware of that fills in this gap haha.
The general proof that, if A^2 = B^2, then A = ±B, needs a) "difference of squares", which only works when multiplication is commutative, and b) a product being only zero if one of the factors is zero (i.e. no zero-divisors). But both of these do NOT apply to matrix multiplication, and that's why you can have zillions of things that square to the same matrix. I hope this helps...
root of a unity in R2 is any linear combination of Pauli matrices such that the coeficients are a^2+b^2+c^2=1 a,b,c are complex numbers and trivial case +/- unity
I know what Pauli matrices are but I must confess that as it is an area of maths I have not looked at much, I had not considered how they could be used in the context of a square root of a matrix. Again showing how awesome maths is, that there are often so many ways of looking at the same problem.
oh wow! haha of course. I genuinely did not spot that when making the example. I was concentrating on picking an example that would not require any surds in the final answers but also would purposefully show the flaws with the first method I was using. I love the random bits of beauty that can be spotted in maths (such as what you just saw).
If you decide to do particle physics in college, get ready to take things to powers of matrices as well! It's super unintuitive and has such a rich structure!
Indeed, but that is what makes this stuff so interesting. There are lots of different methods for finding the square root of a matrix (too many for me to discuss in 1 video, hence why I offered to explore the topic even more in a second video if people asked).
I would guess that, just like how you can easily calculate powers of a matrix by decompositon in the form QDQ^(-1) (where D is a diagonal matrix) and then simply applying the power to the diagonal elements, one could do the same with the square root operation as it's equivalent to taking the matrix to the power of ½
Yes! exactly. I do mention this in the video (at roughly 13:40 in the video) but after that, I then show an EVEN BETTER way than that for 2x2 matrices. See 14:18 onwards in the video.
@MathsLikeALegend I indeed did see! Just ended commenting prior to watching, as I figured I could cheekily predict the content, but was pleasantly surprised! just happened to have recently gone a linear algebra course in uni, so all this stuff is still pretty fresh in my mind linear algebra is honestly my favourite part of maths, as everything just makes sense and every operation directly yield meaningful results or insights, none of that "here's 10 different methods for doing the same thing, but whether or not they actually yield any results and are even applicable depends on the specific function you're evaluating" crap you get in analysis
haha fair play! You predicted correctly :) I know what you mean about the differences between linear algebra and analysis too. There are some parts of analysis that I absolutely love, but at the same time, exactly as you said, it has too many parts in it that are just like "oh, but in this special case, remember this corollary that means you actually have to do this other thing" hahaha.
A few people have mentioned that now, so I think I will definitely have to make a video on that at some point! :) So therefore thank you for the suggestion :) The next video in this series will be on something different though. I going to try and see if I can build up a core of videos in this series that cover a variety of different things first, before then going back and exploring certain topics further.
A part of the problem mentioned at the start, (not completing a topic before moving on) is caused by large classes... the teacher/lecturer has to get through a certain amount of material at the pace of the slowest student. So any faster student gets to a point that they are done with this portion of this topic and there's more to do, but there's no guidance.
exactly, I fully agree. The eternal challenge of trying to balance the pace of the content taught while not leaving anyone behind. The other inconvenient truth is just knowing (as the teacher) what is needed to be known for a particular exam that students are working towards, and so therefore, you are naturally focussed on that as the bottom line. But that is why I decided to make this TH-cam channel so that I could provide a way for my own students to be able to further explore the things we have introduced in lessons.
You can, in theory :) However, most of the situations in which this approach is straightforward, then one of the quicker methods is going to be viable as well, as therefore a better option. For instance, one of the ways of doing e^matrix is by using the diagonalisation of a matrix..... but then you do not need to use e, because if you have the diagonalisation of the matrix then there is already a direct approach that can then be used to find the square roots :)
That is why although did have to cut out mentioning some other methods in this video, I did choose to include the method I show at 14:18 onwards in the video, because that method is generally quicker than anything else!
Doesn’t the solution with the p and q variables technically already include the solutions with the k variable? As there will exist values of p and q that will match the entries of the solutions with the p and q variables to the entries of the solutions with the k variable? Great video though! Loved every second of it.
Kind of. If we are looking at the options I display at 31:37, then the bottom left option of [3, k; 0, -3] is redundant because of the reason you said. However, that is not the case for the matrix involving k that is directly above that as the issue is that technically, the p & q structure is undefined if q=0. I was originally therefore going to include only that single extra case of [3, 0; k, -3] but then I was worried somebody would point out that I had missed a combination, so avoid arguments I included it haha.
@ got it HAHAHA makes sense. Maybe note in the next videos or something that some of the solution forms are equivalent or extra forms HAHAHA might help build more math intuition if the get to see the relations between the solution forms themselves or something. Still loved your video tho! Instantly subscribed after finishing watching it and I'll be watching the others soon. Cheers and I hope to see more interesting videos from you!!
Kind of. If we are looking at the options I display at 31:37, then the bottom left option of [3, k; 0, -3] is redundant because of the reason you said. However, that is not the case for the matrix involving k that is directly above that as the issue is that technically, the p & q structure is undefined if q=0. I was originally therefore going to include only that single extra case of [3, 0; k, -3] but then I was worried somebody would point out that I had missed a combination, so avoid arguments I included it haha.
@@MathsLikeALegend Sorry, but wouldn't the transposed p&q structure be a valid solution, too? It should, since the matrix we wanna take the square root of is itself equal to it's own transpose? Which then would have the other special matrix [3, 0; k, -3] as special case?!
@@karl131058 correct! :) So that is another way of writing the answers. But therefore, either way multiple matrix structures are needed to cover all the different options for the solutions. I did not write that transpose down in my solution, so that is why I needed to write the [3; 0 k, -3] down.
I only relatively recently learnt about the formula for the 2x2 square root, which is partly what inspired me to make this video, but therefore I have not explored that as an idea much at this stage. I certainly know if it does exist that it will not be a nice formula (for reference I'm going to say that the formula for the 2x2 root is nice) but that is only based on some quick playing about with it on some rough paper, so I am but a novice in this area of maths haha. I will definitely make another video on it if I discover one either through research.
@MathsLikeALegend As part of an MSc thesis in Aircraft Design in 1982, I created a 3- D stiff jointed space frame analysis program in a Commodore Pet, which meant solving a large set of simultaneous linear equations with loads of variables ( depending o the number of nodes in the framework , with each node having 6 degrees of freedom). The result was a massive stiffness matrix, but generally banded with the majority of elements being zero. As computer storage was at a premium, the storage array in the computer was arranged to contain the non-zero elements only where possible. The use of Cholesky's method saved a massive amount of computer storage, and was much faster than Gaussian elimination. (I did use Gaussian elimination on a Sinclair ZX81 to validate on relatively small matrices to ensure both that it and the program on the Commodore Pet gave the same result. ). One problem was nearly vertical members, because one of the stiffness matrix elements included Sin Theta/ Theta, where Theta would be close to Zero, and actually zero for a truly vertical member, so detection of verticality was required, and an approximation included for Theta less than 2 degrees.The Commodore Pet mathematical expressions had a limited number of significant figures compared with modern desktop computers of today. Another issue to be dealt with was ill conditioning, leading to loss of significance, so a check was required and a message output to the user to check the inputs, and design. The main reference I used was Matrix Methods by R K Livesley. I am now 76 and going strong.
That's very interesting to hear :) in many ways we are spoilt by modern technology and the power it gives us. But from speaking to friends in some industries, the most cutting edge stuff still often works to the limits of the technology of the time, so some efficiency tricks like what you mentioned are still needed. As you mentioned with the taking account of the vertical members - it's always those special use cases in any program design that provide those extra challenges. Glad to hear you have still kept your interest in maths/engineering, and I hope to be the same!
Hello! Sorry, I must have not made it clear enough. These are 2 separate equations (not the same equation simplified). That is why I end up with 4 different values of a. 2 of them are from a^2=25/16 and the other 2 are gained from a^2=1/4. These 2 mini-equations for a^2 are both obtained by solving the "disguised" quadratic I had on the screen before it, which was 64a^4-116a^2+25=0.
14:50 I don't find this that surprising, honestly. While Decartes and Leibnitz were doing some linear algebra things in the 17th century, it wasn't until the mid to late 19th century that what we'd call today linear algebra became a thing (in my mind this fact isn't _that_ surprising either, the invention of mechanical and later digital calculators around that time pushed mathematicians towards explore more theoretical parts of mathematics like set theory and group theory). A fairly nieche fact about it taking a while to be properly discovered, especially not as part of a larger project to try and find more general ways of raising a matrix to a power efficiently, feels reasonable.
That is a fair point. I guess I am just so pre-programmed now to just seeing most of the maths closely linked to any of the big core concepts as being older than that. But now you have put it that way, that checks out.
It is one of the main type of qualifications that 16 to 18 year olds take in England during college (what we call college is what people in the U.S call high school). Students usually choose 3 (or sometimes 4) subjects to do A-levels in. Interestingly though, students can choose 2 of those options to both be maths as there is a "Maths A Level" and an additional "Further Maths A Level". Therefore, students who really enjoy the subject, or know they want to study a related subject at university get to learn more so that they are ready for their future.
Before watching the derivation,I instantly thought,oh it has to do with eigenvalues.and it would be easier if we had logarithms. Btw 2*2 matrices are exactly the same as quaternions.
An A-level, or Advanced Level, is a subject-based qualification that students typically study in the UK to prepare for university, further study, training, or work
hahaha. yes. I originally was going to include them in the middle (I had even recorded a bit that was going through that method fully) but then cut it out when I saw how long the video had become by including them. The formula at 14:18 is related to that process though, so we are doing that stuff but in an even quicker way!!
I do mention this in the video (at roughly 13:40 in the video) but after that, I then show an EVEN BETTER way than that for 2x2 matrices. See 14:18 onwards in the video.
@MathsLikeALegend I like the P^(-1) sqrt(D) P method better though. Didn't occur to me before seeing your video. I wonder... since each of the diagonal elements can be +/- independently, does this mean there are 2^n defferent square roots for an nxn matrix. Well, 2^(n-1) if we don't count the obvious repetitions (i.e. negatives of each solution).
exactly! you try all the combinations of D^0.5 for the 2 diagonal elements and that leads you to each of the different roots. So yes there will be potentially 8 roots for a 3x3 etc etc. :)
@MathsLikeALegend true I watched the whole video it was very interesting. that was I was thinking before I hit play. it would be interesting to see fractional exponents too. Just a slight generalization of this.
Haha. Good question. Some people in the other comments have pointed out that these sort of calculations are important for some physics calculations. It's all a matter of opinion though as to whether that is interesting maths or not :D But for that very reason, I am going to try to make the videos in the Can We Do That?!? series cover a variety of topics (something I have tried to do so far) rather than hyper focusing on one concept for several videos in a row. That way hopefully everyone can find something they like :) I will cycle back around to build upon ideas I have introduced in these videos at a later date.
True! Which is why that first method I show in the video is so sub-optimal. Diagonalisation (or the formula i show later which is just the process of diagonalisation generalised for 2x2s) are definitely the way to go!
Hahaha. The advantage of putting things in video format. People can skip through the parts of the video that aren't interesting to them or speed up the playback speed if they understand everything, or alternatively pause the video if they don't understand stuff. Everyone's a winner haha.
true. BUT, as always with using taylor series to find something numerical, your precision is limited by the number of terms you are using. That is fine if you just want the values to a certain number of decimal points, but not if you want it in exact form (unless you know the answer is made of integers and you can see what number the series is converging too).
it is because (luckily) they were not meant to be the same value :) That was two separate quadratic equations gained from the quartic (power of 4) equation that was shown on the previous screen! That is why I then end up with 4 values of a (2 from each of those 2 equations you mentioned. As the quartic itself just had the structure of a quadratic (i.e, instead of an x^2 and an x, it was an (a^2)^2 and an a^2) I had used the quadratic formula to find the values of a^2.
hahahaha. That way, if people feel like they are bored then they have at least seen AN answer if they wish to stop watching. But, of course, it's not the best way of finding the answer, so then we have a reason to continue exploring things.
You can! :) I do mention this in the video (at roughly 13:40 in the video) but after that, I then show an EVEN BETTER way than that for 2x2 matrices. See 14:18 onwards in the video.
In the world of matrices, an inverse matrix does hold that role. Both when it comes to the way they act when we multiply them by a matrix that is to the "power of 1", but also when they are found by using diagonalised matrices. We have to be careful when using them in this role because of course you cannot inverse a singular matrix, but otherwise it is how "power of -1" is defined for matrices.
Of course with the [9,0;0,9] matrix the quartic reafirms a basic truth of both reality and maths... *0 x a ^ 4 + 0 x a ^ 2 + 0 x a ^ 0 = 0* ... Nothing plus nothing plus nothing equals nothing,
3x3 matrices next :)
I'll add it to the list :D
2 by 2 by 2 matrix in a cube root?
@@masonboone4307At that point, you have a rank-3 tensor.
@@Caseofgames thanks I forgot the name!
Right eigenvector matrix times √(diagonal eigenvalue matrix) times right eigenvector matrix ^ -1.
It would also be interesting to consider this from a graphical perspective.
When the title of your video popped up in my list, I instantaneously thought of 4 simple cases (graphically).
1) A matrix that represents a rotation by x degrees can be the square of a matrix that represents a rotation by (x/2) degrees.
2) A matrix that represents a simple stretch by a factor of x can be the square of a matrix that represents a simple stretch by a factor of sqrt(x).
3) A matrix that represents a simple skew can be the square of a matrix that represents a partial skew (needs more discussion on this one)
4) A matrix that represents a simple, uniform expansion in every direction by a factor of x, can be the square of a simple uniform expansion by a factor of sqrt(x).
It further occurs to me that the square-root of a matrix that represents any combination of #1 and #4 can easily be found (based on the expansion factor and degrees of rotation).
I'm guessing there may even be some more graphical intuition here.... Maybe something to do with the eigenvalues and eigenvectors?????? Would be interesting to explore.
An interesting way of looking at it! That definitely seems like a delightfully intuitive way of looking at it!
I think you're treading on the Eigenvector solution he mentioned. Separate the general transform into a product of these pure types of transform.
@@MathsLikeALegend If and/or when you do, I think the one transformation the OP forgot to mention are reflections. Well, and possibly projections, as well. Could be wrong, since I'm thinking of general transformations, not necessarily the square-roots of some transformation.
@@robharwood3538
Exactly.
And the problem is they don't square nicely when stacked with others.
So are some others I think.
Those that represent rotation and uniform stretching can be stacked together, and are analogous to complex multiplication.
Really like the pace. So many TH-cam maths videos are painfully slow, even at 2x playback speed.
it's a difficult balance to strike. I am glad I got it at the right pace for you :)
Hi! I've stumbled upon your channel and, while I've already gone beyond this level of maths, your style of teaching and making videos has been entertaining.
Would you consider doing video about a more abstract topic like group theory? I may be a little biased, of course, but i do think it would be interesting. Of course, it would start by just exploring symmetries and symmetry actions, and you could link to, for example, the roots or unity you've covered in the past and invertible matrices and how they act like symmetries of the vector space structure itself.
Consider it, and if you believe it to be not the level of maths you want on this channel (which i believe though not to be the case: everyone can reason about symmetry) then that's of course fine too
:]
Thank you for the lovely comment, I appreciate it! :) Funnily enough, the very beginning of group theory is one of the things covered by one of the qualifications I teach, so I will make a tutorial video covering it at some point!! The content only covers what a group is, how to determine whether a set with an operation forms a group or not and also (the logical but very easy next step) of abelian groups. So it's definitely something that's on the list of things to do :) [no promises about how long until I get around to doing it though haha]
@ great! I suppose I'll see it appear when you decide to make it.
love such curiosity quenching videos
I am glad you think so! I am basically just trying to answer the things I am also curious about, so if anybody finds it interesting too it's a nice bonus.
Really good video!
Being able to solve for the matrix X based on A, in f(X)=A is actually the main use case (in competitive linear algebra) for the normal form, for functions f that commute with conjugation (like polynomials, or the exponential function).
The normal form of X uniquely determines the normal form of f(X), and if f(X) has the same normal form as A, then A=P⁻f(X)P=f(P⁻XP), for an invertible matrix P.
You can even calculate the dimensions of solution spaces, which is useful when it is 0, because for these matrices A,
AB=BA ⇔ f(A)B=Bf(A) for matrices B.
Interesting to know!
Really cool video Greg, thanks for making it!
I'm really glad you enjoyed it :) One of those sort of subjects that definitely cannot be done justice by a brief 1 minute comment in a lesson.
I love it. Classic example of a teacher having some fun with the class -or- a preview of what is to come ...
And don't forget that when eliminating a square using algebra by taking the square root of both sides can lead to extraneous solutions. You need to check them to be certain. And how to do that is a bit of a mystery at this level as well.
Great video! I thoroughly enjoyed geeking out with you on this topic.
Exactly! This video was actually created directly as a response to a student asking me about it in a lesson 2 weeks ago :) So I just used it as a good excuse to open the door to some new maths!
and yes! you are right about the square root part. In retrospect, that step is exactly why I have ended up not being able to analytically know which value of "a" goes with which value of "d". Another user (chaosredefined3834) in the other comments helpfully pointed out an alternative way I could have solved those simultaneous equations that would have solved the issue.
@MathsLikeALegend I tried both sympy with Python and Wolfram Alpha and both give a single solution. Great lesson for students: extraneous solutions are a true issue when taking sqrt of both sides.
Didn't Dirac take square roots
4:52 oy, you already used that equation once. That's an easy way of messing up, even if it technically works here.
Instead, substitute b=7c in the other 2 equations, solve for c^2 in each, then set those 2 equations equal to each other. (keeping in mind the difference between c^2 and the original c)
At this point, you would have used every equation once. The number of variables=number of equations, as you should've checked before any algebra.
So solve.
20:02 hate it when that happens.
true! There were definitely more elegant ways of approaching the manual-simultaneous-equation part of the problem haha.
I probably did not spend as much time as I should have to check for better ways but that was partly because I knew I was just using that part of the video to highlight why it's not a quick way of doing it and that either the diagonalisation or the formula are the better ways of doing it
Haha, always gotta love the "infinite solutions" situations in systems of equations.
Really great video, my friend. This is *way* better to learn *first* before delving into the eigen-methods later on. At least this can be used in many real-world situations before having to learn more-advanced linear algebra topics. I wish they'd taught me this in high school!
Thank you so much for saying!! :) I appreciate it
Taking non-integer powers of matrices is useful for animation blending, if the matrix represents a model or bone transformation for example. If M^0=I=no transform and M^1=target transform then M^t=intermediate transform at time t from 0 to 1. But I think most game engines interpolate the components (translation, rotation, scale) as vectors or quaternions and then create a matrix from these components.
Good to know. I always try to keep an eye on the general applications of maths topics so that I can indicate to students why we care about things, but it is always nice to hear more specific uses.
Nasty problem is that those intermediates of a real matrix may require complex-valued matrices...
Sorry that I could only give one like! Enjoyed the method and detail.
Thank you! :) very kind of you to say that. I appreciate the support too.
really good video! Your mic quality has improved :)
Thank you! a welcome upgrade for people listening, and for me when I have the pain of listening to myself when editing haha.
After getting a relation between b and c,
You can subtract a²+bc from d²+bc and get
d²-a²=8-2=6
You have (d-a)(d+a)=6, and d+a=1/c
d-a=6c
2d=6c+1/c
d=3c+1/2c
7c²+9c²+3+1/4c²=8
t=4c²
4t+1/t=5
4t²-5t+1=0
(t-1)(4t-1)=0
t=1, c=±½, d=±5/2, b=±7/2, a=-3±5/2
t=¼, c=±¼,d=±11/4, a=-3/2±11/4, b=±7/4
this is arguably a nicer way of dealing with the equations :)
As someone who did their A-level mathematics in 1979
we did possibly more than is on the current curriculum but not much.
We certainly didn't do square roots of matrices but it was interesting
to see you working through.
I have now subscribed for more mathematics.
Thank you for the nice comment! I really appreciate it. I hope I continue to make content that interests you. I generally release a video of this style once every 9 weeks.
Nice video.
Eigen square root via the eigenvalue decomposition gives the most logical one but there are many.
This ends up being very nice if you have a symmetric matrix.
Thank you for the nice comment :)
Many thanks for this interesting video which opens a window to a fascinating field of mathematics.
We might add that the eigenvalues of the matrix m = {{2,7},{1,8}} are 1 and 9, and that the general power is given explicitly by m^p = {{(9^p+7)/8, 7/8(9^p-1)},{1/8(9^p-1),1/8(7 9^p+1)}}.
Examples
m^(-1) = {{(1/9+7)/8, 7/8(1/9-1)},{1/8(1/9-1),1/8(7/9 +1)}} = {{8/9, -(7/9)}, {-(1/9), 2/9}}=1/9 {{8, -7)}, {-1, 2}}
m^(1/2) = 1/4 {{5, 7}, {1, 11}}
We can also study the exponential function of a matrix, as defined by the infinite series e^m = 1+ m+m^2/2!+m^3/3! + ...
which gives
Exp(x m) =1/8 {{7 E^x + E^(9 x), -7 E^x + 7 E^(9 x)}, {-E^x) + E^(9 x), E^x + 7 E^(9 x)}}
Thank you for writing a nice comment! You are right. I was weighing up what to include/not include and you might have seen that I acknowledged but skipped over the eigenvalues stuff in the middle of the video. I had originally planned to fully cover that approach as well but I could see how long the video was getting haha. Perhaps something for a future video one day.
Just for a fun fact, the same thing can be done easier with projector decomposition, where you express the matrix as the sum of an eigenvalue * the projector matrix of the corresponding eigenvector. IMO it's simpler that way
That's the cool thing about this stuff, the fact that there are so many different ways of looking at the same problem
I think this would be a lot easier if you first diagonalised the matrix.
Definitely, it's trivial then. Eignenvectors come in to save the day once again!
If you look later in the video I DO reference diagonalising a matrix (at 13:40 in the video) but after that, I then show an EVEN BETTER way than that for 2x2 matrices. See 14:18 onwards in the video.
I strongly believe diagonalizing the matrix provides much more intuition than doing a bunch of algebra. I don't think there is really much to learn in this video other than watching someone solve equations and count roots
I won't disagree about the benefits of diagonalisation. However, things to consider about the context of this video: A, the formula I show in the latter half of the video is obtained by diagonalisation. So that method is still playing a role in what I showed, even if only indirectly. B, I made this video for, first & foremost, my students (because one of them asked whether it was possible to do this action). Unfortunately, they do not know what eigenvalues, eigenvectors and other thing are yet. Annoying, I know, but the content I teach is decided at a national level (not by me). Therefore I am left with a dilemma. Do I just fob the students off by saying "oh don't worry about that as you will not be able to do it until you reach university."? well, no, because that is the whole reason I am making these videos, to actually solve their curiosity. Or do I try to teach them diagonalisation all within this short video? Well that leads me on to my third point, C, which is arguably, there are a lot of people who learn the process of how to convert a matrix into diagonalised form as just a set of mindless steps rather than thinking about why that works, so isn't that still the same net difference? But if I want to also combat that by going into the explanation of why eigenvectors etc DO help you diagonalise etc etc, that is going to become a much longer video. D, the whole point of the beginning section of this video is precisely to highlight the flaws in the mindless solving equations. Why did I show it even to begin with? It's because in my experience it's the method that people tend to attempt if they have not come across what diagonalisation is yet. I was trying to show in the video that I empathise with them trying that approach as I also tried doing it that way when I was younger but therefore wanted to point out why it was not the best way to approach it. E. Diagonalisation is not without flaws either. So therefore the stuff I do towards the end is important for dealing with that issue. So overall, yes, I do agree with the point you are trying to make, but also, I hope you can empathise with why the video has been made the way it has. :)
diagonalizing doesn't directly help (even if you can diagonalize, which you can't in the general case), because they are not orthogonal. This works for symmetric matrices: keep the eigenvectors, replace the eigenvalues by sqrt(eigval) [as long as all eigvals are positive]. If A= B E BT with B matrix of eigenvectors, sqrt(A) is NOT B sqrt(E) BT unless B is an orthogonal matrix (in which case A becomes symmetric)
As in the case for a solution of Ax = B, there is either 1) a unique solution, 2) no solution, or 3) and infinite number of solutions, related to the linear independence of the initial system.
I had not thought of looking at it that way, but yes. But arguably the interpretation as to why those are the possible options for numbers to solutions to AX=B is more intuitive due to it's geometrical link to the intersection of planes. Whereas I would interested to know if there is a nice way to geometrically interpret the roots of a matrix haha.
@@MathsLikeALegend Perhaps. In the typical sense of real numbers, the square of a real number S, when multiplied together, is geometrically represented by a square of area S and two perpendicular lines each of length sqrt(S). So perhaps there is a geometric planar representation in N x N (2 x 2 for example) space of a matrix where pairs of orthogonal planes with surface areas sqrt(S) complete a cube of volume S, but the dimensions appear to be off because we are talking about an area vs a volume. So perhaps the cross product of eigenvectors of length sqrt(s) with area S would work better?
I agree with you about the dimension seeming to be off, but equally, I do not have the answer for what could be done about it. Interesting stuff though :)
The fact that this man only has 764 subscribers (at the moment) is insane! He deserves more. 765 now!
That's really lovely of you to say! Thank you very much for the nice comment and for becoming a subscriber.
Welcome to another episode of interesting solution to a problem I didn't know I have.
Haha. Thank you for the nice comment, and I am sorry for making you aware of problems that you didn't think were problems.
Hold up. From when you were doing it with numbers, you found yourself with
a^2 + 7/(a + d)^2 = 2, and d^2 - a^2 = 6. Now, I agree that these equations look pretty annoying. But not because of the squared. I don't like that pesky (a+d)^2 in the denominator. And, when I look at this, I see a very nice trick to get rid of them.
First, I'm going to multiply the numerator and denominator of that fraction by (a - d)^2
a^2 + 7(a - d)^2 / (a + d)^2 (a - d)^2 = 2
Next, I'm going to combine the two terms in the denominator by noting that a^2 b^2 = (ab)^2
a^2 + 7(a - d)^2 / [(a + d)(a - d)]^2 = 2
Next, I'm going to use the difference of squares formula: (a + d)(a - d) = a^2 - d^2
a^2 + 7(a - d)^2 / (a^2 - d^2)^2 = 2
Now, we know that d^2 - a^2 = 6. So, a^2 - d^2 = -6, and (a^2 - d^2)^2 = (-6)^2 = 36. That (a^2 - d^2)^2 is the denominator of our fraction, so let's plug that in.
a^2 + 7(a - d)^2 / 36 = 2
Next, multiply through by 36
36 a^2 + 7(a - d)^2 = 72
Expanding out the brackets and joining like terms, we get
43 a^2 - 14ad + 7 d^2 = 72
Next, I have a d^2 - a^2 = 6 equation. This means that a^2 - d^2 = -6, or 7a^2 - 7d^2 = 42. Adding that to the above equation gives us
50a^2 - 14ad = 114
Multiplying through by 3
150a^2 - 42ad = 342
Now, multiplying our d^2 - a^2 = 6 equation by 57, we get 57d^2 - 57a^2 = 342. So, we now have two different ways of writing 342, so those are equal.
150a^2 - 42ad = 57d^2 - 57a^2
207 a^2 - 42ad - 57 d^2 = 0
Dividing through by d^2 gives us
207 (a/d)^2 - 42 (a/d) - 57 = 0.
Solve for a/d, substitute back into a^2 - d^2 = -6, and you get a value for one of them, then use a/d to get the other.
oooooooo, I love that approach. Of course! I should have spotted that as funnily enough I helped one of my students with one of those type of a^2+5ab+6b^2 style equations the other day haha. That in theory looks like it would solve that uncertainty of the pairings. I will confess that I brushed over the solution to those equations when creating this video by just reusing the approach I had used as a younger man and did not revisit it/consider other approaches (because I knew i was going to focus on the formula for the square root later in the video). But therefore I appreciate your comment a lot :) If I make a follow on video, I will probably reference what you did (and attribute it to you) as a correction to what I did here if that is alright.
@@MathsLikeALegend Go for it.
It can actually all be simplified to 6 simple equations:
ad-bc = ±sqrt(AD-BC) ≡ δ₁,₂
a+d = ±sqrt(A+D+2δ) ≡ t₁,₂
A+δ = t*a
B = t*b
C = t*c
D+δ = t*d
These contain all the information, and account for all cases.
To solve you find the δ's and t's, and for each option you solve the rest.
If a t is 0 and the left sides are as well, you get an infinate family of solutions, and you can check the definition of δ and t for the constraints.
Yes, I debated whether to use that way of writing it or not. It makes it look less messy but then, if you having to define these variables at the beginning of the formula, for those referencing the formula for the first time, it then requires people to then go "oh what do those things mean again" and repeatedly cross reference it. But obviously the form you are talking about makes it easier to remember.
depending on the values of the eigenvalues, you can compute sqrtm(A) using matrix functional calculus, which involves calculating eigenvalues and looking for a solution of the form aA+bI (for 2x2, or aA^2+bA+cI for 3x3, etc.), and in the end the constants a,b are found by solving a system of LINEAR equations. The only "hard work" is in finding the eigenvalues.
True. I don't know if that is/isn't quicker than doing diagonalisation or not. Depends how much you are allowed to use a calculator? haha.
square root need to be defined on a bijective fuction, so you need to clearly stated how a matrix "sq root" operation's definition
Yes. I will openly admit to being flippant with defining things at the beginning of problems as I am often too impatient and want to get on with actually solving stuff haha. But you are right, and those definitions at the beginning are important for laying out what it is we are trying to find and what the "rules" are so to speak.
It is always interesting how math results in unintuitive things, like square roots of matrices, finite sums of infinite series, nonzero results from expressions that approach "infinity minus infinity", and so on.
yes!!!! I totally agree with you. I still get amazed by these results too, no matter how long I have known them for, not matter how long I have known the proofs behind them etc etc. It's all just so satisfyingly "neat".
I think I found a new channel to binge watch
hahaha. You legend! Thanks for the support. In return I will have to work hard to ensure I can create enough content for you to continue to binge haha.
When I saw this thumbnail I tried to solve the general myself before watching this video, and got to the formula you showed it.
Pretty shocked it's that recent, I guess no one bothered, cause it was pretty straight forward.
Anyway, patting myself on the back here
haha. Always satisfying when maths ends up doing exactly what you expected.
Holy fuck, recently discovered this channel, thank you for revealing a little bit more than the tip of the iceberg for some of us.
Hahaha. My favourite comment of the day. Thank you for the nice words.
Yes. Diagonalize, root diagonal, undiagonalize. You can do other functions this way too.
Indeed. A very useful tool! A bit annoying to write out if you have complex eigenvalues but with modern calculators able to calculate matrix operations so easily then it saves a lot of time.
Not all matrices are diagonalizable
I’m taking a course right now called Mathematical Methods in the Physical Sciences which is pretty common in physics curricula. We discussed calculus of operators and matrices, and the square root of matrices is actually pretty important!
Any second-order time-evolution equation
(d2/dt2) y(t) = -B y(t)
can be solved by evaluating the exponentiation of the square root of the operator B
y(t) = exp(-i sqrt(B) t) * y(0)
ohhh that is actually genuinely very interesting! The modules I ended up choosing during my degree ended up steering me away from the Physics-aspects of maths and so therefore I never got to be taught about things like this. Pretty cool.
Regarding the eigenvalues, eigenvectors and diagonalization, it will probably not be enough, since not every matrix is diagonalizable. In any case, in defense of these eigenvalues, I would argue that it is a much better time spent learning about them than these very specific computations for square root of a matrix, so I don't have any problem if teachers skip such computations. These eigenvalues appear almost everywhere in mathematics and in engineering, and have such an interesting structure and give much better intuition to such problems.
Indeed, which is why I could have quite easily made this video about 3 times as long talking about more of the methods haha. Each of them has a flaw and an advantage (such as solving the equations at the beginning being messy, but will always find every possible square root eventually; diagonalisation, which still can be quite long without a calculator and does not work for all matrices but can be applied to matrices with higher dimensions or the the formula I showed towards the end which is the quickest method by far, but only works for 2x2 matrices and does not work for the same matrices that diagonalisation does not work for) All in all, an interesting problem because there are so many ways of looking at it! :)
import numpy as np
a = np.array([[1,2],[3,4]])
b = np.sqrt(a)
print(b)
Did it
hahaha. the classic answer - "just get a computer to do it for you"
One way to visualize the case of infinite solutions geometrically treating the matrices as R2->R2 transforms...
You can rotate the image any number of whole times and get the same result. In the "k" case in the video, this represents scaling by 3 in x and -3 in y, flipping it, and k=1 introduces a shear. But because it is flipped along y (mirroring it), repeated application will undo the shear.
That is a nice way of viewing it
In matrix calculus you often need A times Atransposed e.g. for a quadratic model function. Would this make life easier? Another simplification may come with using vectors first.
Using transposed matrices is certainly used as part of the method to diagonalise some matrices (which as I mentioned in the video is one of the main approaches for this stuff), although using transpose to do that is a trick that only works for symmetrical matrices. Beyond that, I do not know how transposing could be used (not because I'm saying it can't... I just do not know haha)
Get any Gram Matrix K.
K = ULU' where U and L is an eigen-vector/value decomposition of the matrix.
K = (UL^1/2)(UL^1/2)'
UL^1/2 is your result, basically.
And L^1/2 is easy to get because it's a diagonal matrix.
You can also do it with any other kind of matrix, but it may introduce complex numbers.
Non-square matrices are also possible, but then it's an svd decomposition instead of an eigen one, and it should probably be considered an extension of sqrt... Anyway....
lots of different methods! the awesomeness of maths
What about the more general case of taking a matrix to the (1/n) power?
Good question. It is something I will make a video on sometime. Short answer though: easiest to do it using the eigenvalues/eigen vectors/diagonalisation method I referenced in the middle of the video
Also, what about division for matrices? Would that just be multiplying by its inverse? Thanks.
Yes! :) multiplying by the inverse replaces the traditional role of division. This is because multiplying matrices gives a different result depending on which way around they were multiplied. So a blanket "Divide" is not specific enough.
At 5:31 there is no need to take square roots to get an expression for d in terms of a. Why not compute the eigenvalues and eigenvectors of the given matrix, write down the diagonalizing matrix and its inverse (if the given matrix is diagonalizable, if not a slight modification based on Jordan normal form can be used) and sandwich the square root of the diagonal matrix between them? That method works not only for 2x2 but any size matrix.
True haha. Somebody else earlier in the comments already pointed out a better way of solving those equations :) I will admit that I only included entire first section of the video with the simultaneous equations to illustrate that this approach is clearly slow and inefficient, which then shows why the methods mentioned later in the video such as diagonalisation (at roughly 13:40 in the video) or the square root of a 2x2 formula (see roughly 14:18 onwards in the video) that I show after that both seem much better in comparison! Therefore, I did not spend very long on considering the perfect way to solve the equations at the beginning because I knew I was moving on from it later in the video. sorry for the lazy maths though!
wow very interesting video 👍
I am glad you enjoyed it! It interests me because it's a problem that seems so simple at first but then the more you explore it, the weirder it becomes.
@ I completely agree - I definitely didn’t expect there to be so many different possible numbers of square roots, I assumed it would just be like the square root of a complex number
awesome
thank you for your support :)
The formula at 19:15 has three +/- signs, which means there are eight combinations and thus eight roots, not four
yes, but two of them are synchronised, so that means when you pick the the + in one of them, the + has to be picked on one of the other +/- places as well or the formula does not work. and vice verse, if you pick the - then you have to pick the corresponding - . That is why I did not include the third +/- in the same overall equation (wrote is "S or -S" instead) so that you knew which one was independent of the other two. :)
ay Greg u know who this is. Just wanted to let you know that I miss having lessons with Joel, Hannah and you. Uni is fine but my lecturers just aren't the same. Thank you, I don't think I would have gotten the grades I got without your motivational speeches. I am also glad that this video took off and I wish you the best of luck for the future of your channel.
wait who is this I wonder
@@inertwigg josh GET OUT
@@justinkamper5764 🤗
wheyyyyy. You are right, I definitely know who this is! Good to hear from you Justin! You got some really good grades in both Maths & Further Maths in the summer (and they were high grade boundaries for your papers so respect for that). I am sure that if you continue to have that motivation and determination that enabled you to get those results that you will achieve your career goals. That's really very kind of you to say, and I shall pass on your well wishes to Hannah & Joel too. I'm of course very happy with how this video is doing, but do not worry - I'm still just the same maths teacher that you know, still enjoying being in the classroom!
I also massively appreciate your support here too!
I noticed that the mathematical typesetting in a couple of the slides was a little off. It makes me wonder, what are you using to create your slides?
All the mathematical notation is done using microsoft equation editor haha. (instead of the usual choice of LaTeX). It might just be me lining things up badly because sometimes I have to have different parts of the notation as separate objects so that they can be independently animated. Or we could just blame microsoft. you choose hahaha.
What about Exp (Ln (M) / 2), using power series for the Ln & Exp? Does this fit in to the story?
that works when M is "close enough" to the identity matrix in some sense. trouble is that if you want to do the logarithmic method, you can usually apply similar calculation techniques based on the square root instead (in this case, power series)
@Errenium answered your comment very well. One of the main reasons I did not mention exponentials of a matrix at all in this video was because of the level I was trying to pitch the video at. However, also the aforementioned issue with the power series of the Log of a matrix restricts the usefulness of that as a method on a broader scale.
1 - I'm not suggesting that using power series is a practical computational technique, but only out of theoretical interest.
2 - I don't claim to know what I'm talking about, so regard my comments as guesses or questions.
So would the comment "close enough to the identity" mean the absolute value of the determinant of M - I is less than 1, where I is the identity matrix?
And if it is not, could we rescale M so that | Det (sM - I) | < 1, and then handle the scale factor s separately?
Ah fair :) We are all just explorers in the world of maths. Well, in which case my response would be:
1 - this is on the real edge of my knowledge so take what I say with a HUGE pinch of salt (I am not a university professor)...but....
2 - That approach should theoretically work. I have not tried doing it that way though, so therefore I would not be able to comment on the accuracy of that approach. When using a power series to calculate anything numerically, the result is of course affected by how many terms of the series you are using AND any inaccuracies would be compounded if you used a power series to do BOTH the Log AND exponential calculations and then if you put a scale factor adjustment on top of that (to account for it not being originally close to I as you said - a neat trick though if it works) at the end I do not know if all of that might blow any initially small margin of error in to a big one by the end.
3 - therefore, I would be interested to know purely for the sake of curiosity if you try it that way, to know if it can lead to results that are close to it in any form (do not worry, I'm not saying that with the intention to steal your idea so I can make a video about it.)
4 - That is therefore why I am guessing that Errenium was saying that most of the ways for calculating exp or log of a matrix involves methods that could be used to calculate the square root in a more direct way, such as diagonalisation. But I found your suggestion interesting because I had not even considered that as an approach! :)
@@graptemys4186 You know, I hadn't thought of the scaling either. I'd bet you're right, though. I think we'd need to be a bit more careful about it in some cases: scaling down by the largest magnitude of the eigenvalues or even scaling with a diagonal matrix of the inverses of the nonzero eigenvalues.
I'm just speculating-I don't want to imply this is an area I'm very familiar with. But I am very interested. I hope if any of us finds something they'll share with the others.
How does all this fit with the Fundamental Theorem of Algebra? Or does it not apply here?
Good question. As far as I am aware, it does not fit into the fundamental theorem of algebra because that is only for univariate polynomials. As matrices multiple elements, arguably those are introducing extra variables (kind of, kind of not) that mean that it does not have to hold anymore. However, as always with maths I have to caveat that by saying "as far as I am aware" as there always might be an area of maths that I am not aware of that fills in this gap haha.
The general proof that, if A^2 = B^2, then A = ±B, needs a) "difference of squares", which only works when multiplication is commutative, and b) a product being only zero if one of the factors is zero (i.e. no zero-divisors). But both of these do NOT apply to matrix multiplication, and that's why you can have zillions of things that square to the same matrix. I hope this helps...
That's a good explanation! Cheers for the contribution @karl131058 :)
thanks for the video
You are welcome! I am glad you enjoyed it and I appreciate the support.
root of a unity in R2 is any linear combination of Pauli matrices such that the coeficients are a^2+b^2+c^2=1 a,b,c are complex numbers and trivial case +/- unity
I know what Pauli matrices are but I must confess that as it is an area of maths I have not looked at much, I had not considered how they could be used in the context of a square root of a matrix. Again showing how awesome maths is, that there are often so many ways of looking at the same problem.
Thank you for your time
you are welcome! :)
nice example matrix with the first 4 digits of e
oh wow! haha of course. I genuinely did not spot that when making the example. I was concentrating on picking an example that would not require any surds in the final answers but also would purposefully show the flaws with the first method I was using. I love the random bits of beauty that can be spotted in maths (such as what you just saw).
If you decide to do particle physics in college, get ready to take things to powers of matrices as well! It's super unintuitive and has such a rich structure!
Something for some viewers to look forward to! :D
I suspect that geometric algebra would provide a satisfying result. It would also get at what it means to multiply and divide geometric objects.
The intuition of geometrical interpretations of things is always nice!
What about Babylonian recursive method of M^0.5:
N = (inv(N)M + N)/2
It always work when determinant is positive.
Indeed, but that is what makes this stuff so interesting. There are lots of different methods for finding the square root of a matrix (too many for me to discuss in 1 video, hence why I offered to explore the topic even more in a second video if people asked).
@@MathsLikeALegend I can calculate an exponent of a matrix, but i wanted to get a reversed function for this (logarithm), so, it was problematic.
I would guess that, just like how you can easily calculate powers of a matrix by decompositon in the form QDQ^(-1) (where D is a diagonal matrix) and then simply applying the power to the diagonal elements, one could do the same with the square root operation as it's equivalent to taking the matrix to the power of ½
Yes! exactly. I do mention this in the video (at roughly 13:40 in the video) but after that, I then show an EVEN BETTER way than that for 2x2 matrices. See 14:18 onwards in the video.
@MathsLikeALegend I indeed did see! Just ended commenting prior to watching, as I figured I could cheekily predict the content, but was pleasantly surprised!
just happened to have recently gone a linear algebra course in uni, so all this stuff is still pretty fresh in my mind
linear algebra is honestly my favourite part of maths, as everything just makes sense and every operation directly yield meaningful results or insights, none of that "here's 10 different methods for doing the same thing, but whether or not they actually yield any results and are even applicable depends on the specific function you're evaluating" crap you get in analysis
haha fair play! You predicted correctly :) I know what you mean about the differences between linear algebra and analysis too. There are some parts of analysis that I absolutely love, but at the same time, exactly as you said, it has too many parts in it that are just like "oh, but in this special case, remember this corollary that means you actually have to do this other thing" hahaha.
this is cool thank you for this
you are welcome! :)
What is next? e^A using Taylor expansion?
A few people have mentioned that now, so I think I will definitely have to make a video on that at some point! :) So therefore thank you for the suggestion :) The next video in this series will be on something different though. I going to try and see if I can build up a core of videos in this series that cover a variety of different things first, before then going back and exploring certain topics further.
A part of the problem mentioned at the start, (not completing a topic before moving on) is caused by large classes... the teacher/lecturer has to get through a certain amount of material at the pace of the slowest student. So any faster student gets to a point that they are done with this portion of this topic and there's more to do, but there's no guidance.
exactly, I fully agree. The eternal challenge of trying to balance the pace of the content taught while not leaving anyone behind. The other inconvenient truth is just knowing (as the teacher) what is needed to be known for a particular exam that students are working towards, and so therefore, you are naturally focussed on that as the bottom line. But that is why I decided to make this TH-cam channel so that I could provide a way for my own students to be able to further explore the things we have introduced in lessons.
Cholesky decomposition? A = LL* is sort of a square root.
Yes! Somebody else in the comments mentioned that, so I looked it up and I agree haha.
Can’t you use the e^matrix formula to do it
You can, in theory :) However, most of the situations in which this approach is straightforward, then one of the quicker methods is going to be viable as well, as therefore a better option. For instance, one of the ways of doing e^matrix is by using the diagonalisation of a matrix..... but then you do not need to use e, because if you have the diagonalisation of the matrix then there is already a direct approach that can then be used to find the square roots :)
That is why although did have to cut out mentioning some other methods in this video, I did choose to include the method I show at 14:18 onwards in the video, because that method is generally quicker than anything else!
@@MathsLikeALegend cool
So sqrt of matrix n×n have number of roots equals to number of elements there?
I rather think 2^n, typically.
(Each of n eigenvalues has a + or - root.)
yes! what @landsgevaer said :)
Doesn’t the solution with the p and q variables technically already include the solutions with the k variable? As there will exist values of p and q that will match the entries of the solutions with the p and q variables to the entries of the solutions with the k variable?
Great video though! Loved every second of it.
Kind of. If we are looking at the options I display at 31:37, then the bottom left option of [3, k; 0, -3] is redundant because of the reason you said. However, that is not the case for the matrix involving k that is directly above that as the issue is that technically, the p & q structure is undefined if q=0. I was originally therefore going to include only that single extra case of [3, 0; k, -3] but then I was worried somebody would point out that I had missed a combination, so avoid arguments I included it haha.
@ got it HAHAHA makes sense. Maybe note in the next videos or something that some of the solution forms are equivalent or extra forms HAHAHA might help build more math intuition if the get to see the relations between the solution forms themselves or something.
Still loved your video tho! Instantly subscribed after finishing watching it and I'll be watching the others soon. Cheers and I hope to see more interesting videos from you!!
Aren't the answers with k in them the same as the bigger answer with p and q if you set p = 3? Nice video btw
Kind of. If we are looking at the options I display at 31:37, then the bottom left option of [3, k; 0, -3] is redundant because of the reason you said. However, that is not the case for the matrix involving k that is directly above that as the issue is that technically, the p & q structure is undefined if q=0. I was originally therefore going to include only that single extra case of [3, 0; k, -3] but then I was worried somebody would point out that I had missed a combination, so avoid arguments I included it haha.
@@MathsLikeALegend Sorry, but wouldn't the transposed p&q structure be a valid solution, too? It should, since the matrix we wanna take the square root of is itself equal to it's own transpose? Which then would have the other special matrix [3, 0; k, -3] as special case?!
@@karl131058 correct! :) So that is another way of writing the answers. But therefore, either way multiple matrix structures are needed to cover all the different options for the solutions. I did not write that transpose down in my solution, so that is why I needed to write the [3; 0 k, -3] down.
And what about matrices as exponents?
Indeed... an interesting idea. Perhaps one I shall make a future video about!
can we generalize this for a n by n matrix? does s general formula for that even exist?
I only relatively recently learnt about the formula for the 2x2 square root, which is partly what inspired me to make this video, but therefore I have not explored that as an idea much at this stage. I certainly know if it does exist that it will not be a nice formula (for reference I'm going to say that the formula for the 2x2 root is nice) but that is only based on some quick playing about with it on some rough paper, so I am but a novice in this area of maths haha. I will definitely make another video on it if I discover one either through research.
Amazing
thank you very much for nice words. I appreciate it! :)
Method of Cholesky is a bit like taking a square root.
I had to look up what you meant, but having now seen it, absolutely yes!
@MathsLikeALegend As part of an MSc thesis in Aircraft Design in 1982, I created a 3- D stiff jointed space frame analysis program in a Commodore Pet, which meant solving a large set of simultaneous linear equations with loads of variables ( depending o the number of nodes in the framework , with each node having 6 degrees of freedom). The result was a massive stiffness matrix, but generally banded with the majority of elements being zero. As computer storage was at a premium, the storage array in the computer was arranged to contain the non-zero elements only where possible. The use of Cholesky's method saved a massive amount of computer storage, and was much faster than Gaussian elimination. (I did use Gaussian elimination on a Sinclair ZX81 to validate on relatively small matrices to ensure both that it and the program on the Commodore Pet gave the same result. ).
One problem was nearly vertical members, because one of the stiffness matrix elements included Sin Theta/ Theta, where Theta would be close to Zero, and actually zero for a truly vertical member, so detection of verticality was required, and an approximation included for Theta less than 2 degrees.The Commodore Pet mathematical expressions had a limited number of significant figures compared with modern desktop computers of today. Another issue to be dealt with was ill conditioning, leading to loss of significance, so a check was required and a message output to the user to check the inputs, and design. The main reference I used was Matrix Methods by R K Livesley.
I am now 76 and going strong.
That's very interesting to hear :) in many ways we are spoilt by modern technology and the power it gives us. But from speaking to friends in some industries, the most cutting edge stuff still often works to the limits of the technology of the time, so some efficiency tricks like what you mentioned are still needed. As you mentioned with the taking account of the vertical members - it's always those special use cases in any program design that provide those extra challenges. Glad to hear you have still kept your interest in maths/engineering, and I hope to be the same!
It generates triangle matrix
at 9:29 we have 25/16 = 1/4 ???
Hello! Sorry, I must have not made it clear enough. These are 2 separate equations (not the same equation simplified). That is why I end up with 4 different values of a. 2 of them are from a^2=25/16 and the other 2 are gained from a^2=1/4. These 2 mini-equations for a^2 are both obtained by solving the "disguised" quadratic I had on the screen before it, which was 64a^4-116a^2+25=0.
14:50 I don't find this that surprising, honestly. While Decartes and Leibnitz were doing some linear algebra things in the 17th century, it wasn't until the mid to late 19th century that what we'd call today linear algebra became a thing (in my mind this fact isn't _that_ surprising either, the invention of mechanical and later digital calculators around that time pushed mathematicians towards explore more theoretical parts of mathematics like set theory and group theory). A fairly nieche fact about it taking a while to be properly discovered, especially not as part of a larger project to try and find more general ways of raising a matrix to a power efficiently, feels reasonable.
That is a fair point. I guess I am just so pre-programmed now to just seeing most of the maths closely linked to any of the big core concepts as being older than that. But now you have put it that way, that checks out.
What is A-Level?
It is one of the main type of qualifications that 16 to 18 year olds take in England during college (what we call college is what people in the U.S call high school). Students usually choose 3 (or sometimes 4) subjects to do A-levels in. Interestingly though, students can choose 2 of those options to both be maths as there is a "Maths A Level" and an additional "Further Maths A Level". Therefore, students who really enjoy the subject, or know they want to study a related subject at university get to learn more so that they are ready for their future.
I love the square root of -1 in matrix form is i = (0 -1)
(1 0)
the beauty of maths is that it all connects up!
Before watching the derivation,I instantly thought,oh it has to do with eigenvalues.and it would be easier if we had logarithms.
Btw 2*2 matrices are exactly the same as quaternions.
and surprise surprise, it is haha. Or at least, it's one of the ways of doing it.
What is A level?
An A-level, or Advanced Level, is a subject-based qualification that students typically study in the UK to prepare for university, further study, training, or work
They are the qualifications students study from ages 16 to 18 in England in what we call college (but the U.S call high school)
you're famous now dont forget me
How can I forget inertwigg, the mystery ex-student.
❤❤❤
:)
eigenvectors were done dirty in this video 😢
hahaha. yes. I originally was going to include them in the middle (I had even recorded a bit that was going through that method fully) but then cut it out when I saw how long the video had become by including them. The formula at 14:18 is related to that process though, so we are doing that stuff but in an even quicker way!!
Next, exponentials and logarithms of matrices.
an idea for a potential future video!
Raising e to the power of a matrix is definitely useful. I think 3blue1brown has a video on it
I was expecting diagonalization. You can easily show that you just take the square root of the diagonal matrix and recompose it.
I do mention this in the video (at roughly 13:40 in the video) but after that, I then show an EVEN BETTER way than that for 2x2 matrices. See 14:18 onwards in the video.
Yeah you can iterate X
Where there's a mathematics problem, there's almost always a numerical method for solving it haha.
@MathsLikeALegend I like the P^(-1) sqrt(D) P method better though. Didn't occur to me before seeing your video. I wonder... since each of the diagonal elements can be +/- independently, does this mean there are 2^n defferent square roots for an nxn matrix.
Well, 2^(n-1) if we don't count the obvious repetitions (i.e. negatives of each solution).
exactly! you try all the combinations of D^0.5 for the 2 diagonal elements and that leads you to each of the different roots. So yes there will be potentially 8 roots for a 3x3 etc etc. :)
well yes. if you have a matrix A made up of the multiple of 2 matrices B so that A = B * B, then the square root of A is B.
Haha. You are not wrong.... but luckily I did not take an entire video to just explain that.
@MathsLikeALegend true I watched the whole video it was very interesting. that was I was thinking before I hit play. it would be interesting to see fractional exponents too. Just a slight generalization of this.
So, it’s possible. Now let’s think of possible applications, that could be a fun conversation.
a world of possibilities
A matrix has a product, and of that product, we can take the root.
Indeed!
"Way too much time" Faster then me squaring a 3x3 matrix 💀
To give you credit, squaring a 3x3 manually is a fair amount of number crunching!
Next Cube roots, then roots in general?
a good idea! It won't be THE next video in this series, but it is definitely going to be something I want to make a video on.
@ it all seems a lot of hard work, does all this hard work lead to interesting maths?
Haha. Good question. Some people in the other comments have pointed out that these sort of calculations are important for some physics calculations. It's all a matter of opinion though as to whether that is interesting maths or not :D But for that very reason, I am going to try to make the videos in the Can We Do That?!? series cover a variety of topics (something I have tried to do so far) rather than hyper focusing on one concept for several videos in a row. That way hopefully everyone can find something they like :) I will cycle back around to build upon ideas I have introduced in these videos at a later date.
@@MathsLikeALegend keep up the good work. These questions don’t go away, and your presentations will be around for ever now.
The whole point of algebra is to do things with numbers without having to think about the numbers.
True! Which is why that first method I show in the video is so sub-optimal. Diagonalisation (or the formula i show later which is just the process of diagonalisation generalised for 2x2s) are definitely the way to go!
Not bad at twice the speed
Hahaha. The advantage of putting things in video format. People can skip through the parts of the video that aren't interesting to them or speed up the playback speed if they understand everything, or alternatively pause the video if they don't understand stuff. Everyone's a winner haha.
Yeah you can just plug in the matrix into the taylor series of sqrt(x)
true. BUT, as always with using taylor series to find something numerical, your precision is limited by the number of terms you are using. That is fine if you just want the values to a certain number of decimal points, but not if you want it in exact form (unless you know the answer is made of integers and you can see what number the series is converging too).
Got to 10:01 and I’m thinking, “every 2 x 2 matrix has 4 square roots?”
Indeed. and then, in a typically beautiful way (as maths often does) the options don't just stop there. It's cool stuff!
@ Very true my friend
e to the power of a matrix next.
Those who know will know😂
Hahahaha. yes..... it's certainly an intriguing operation..... 😂
Just thought of the cube root of this matrix.
Ooo, an interesting idea. Perhaps something I could/should make a future video about!
road to 10k views
Surprisingly, yes haha. A pleasant surprise though.
I had to stop at turning 25/16 into 1/4. I don't see how that is correct.
it is because (luckily) they were not meant to be the same value :) That was two separate quadratic equations gained from the quartic (power of 4) equation that was shown on the previous screen! That is why I then end up with 4 values of a (2 from each of those 2 equations you mentioned. As the quartic itself just had the structure of a quadratic (i.e, instead of an x^2 and an x, it was an (a^2)^2 and an a^2) I had used the quadratic formula to find the values of a^2.
@@MathsLikeALegend Ah that makes more sense. Maybe I should have had the sound on when I watched.
@@LeonardHarris That would explain the confusion haha
“And there we go” 9:27
*cough* a third of the way through? Sure
hahahaha. That way, if people feel like they are bored then they have at least seen AN answer if they wish to stop watching. But, of course, it's not the best way of finding the answer, so then we have a reason to continue exploring things.
Do we need to know this for A level
1:36 in he says it's not needed for A level
@@rimmerandford where does it say that mate
I'll make the siren louder next time haha
@@MathsLikeALegend there was a siren?
Can't you just diagonalize the matrix?
You can! :) I do mention this in the video (at roughly 13:40 in the video) but after that, I then show an EVEN BETTER way than that for 2x2 matrices. See 14:18 onwards in the video.
Cholenschol decomposition
another way of approaching it!
2:09 …Or is it even possible??
haha. I like to build the mystery in the videos haha
Negative powers are not the same thing as inverse.
In the world of matrices, an inverse matrix does hold that role. Both when it comes to the way they act when we multiply them by a matrix that is to the "power of 1", but also when they are found by using diagonalised matrices. We have to be careful when using them in this role because of course you cannot inverse a singular matrix, but otherwise it is how "power of -1" is defined for matrices.
Of course with the [9,0;0,9] matrix the quartic reafirms a basic truth of both reality and maths...
*0 x a ^ 4 + 0 x a ^ 2 + 0 x a ^ 0 = 0* ...
Nothing plus nothing plus nothing equals nothing,
haha. yes, it is reassuring at the very least 😂
just raise to the 1/2 th power lol
just like that haha.