Close Menu
    Trending
    • How Flawed Human Reasoning is Shaping Artificial Intelligence | by Manander Singh (MSD) | Aug, 2025
    • Exaone Ecosystem Expands With New AI Models
    • 4 Easy Ways to Build a Team-First Culture — and How It Makes Your Business Better
    • I Tested TradingView for 30 Days: Here’s what really happened
    • Clone Any Figma File with One Link Using MCP Tool
    • 11 strategies for navigating career plateaus
    • Agentic AI Patterns. Introduction | by özkan uysal | Aug, 2025
    • 10 Things That Separate Successful Founders From the Unsuccessful
    AIBS News
    • Home
    • Artificial Intelligence
    • Machine Learning
    • AI Technology
    • Data Science
    • More
      • Technology
      • Business
    AIBS News
    Home»Artificial Intelligence»Understanding Matrices | Part 3: Matrix Transpose
    Artificial Intelligence

    Understanding Matrices | Part 3: Matrix Transpose

    Team_AIBS NewsBy Team_AIBS NewsJuly 22, 2025No Comments13 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    Share
    Facebook Twitter LinkedIn Pinterest Email


    the primary 2 tales of this collection [1], [2], we:

    • Launched X-way interpretation of matrices
    • Noticed bodily that means and particular circumstances of matrix-vector multiplication
    • Seemed on the bodily that means of matrix-matrix multiplication
    • Noticed its habits on a number of particular circumstances of matrices

    On this story, I wish to share my ideas concerning the transpose of a matrix, denoted as AT, the operation that simply flips the content material of the sq. desk round its diagonal.

    An instance of a 3×4 matrix “A”, and its transpose “AT“.

    In distinction to many different operations on matrices, it’s fairly straightforward to transpose a given matrix ‘A‘ on paper. Nevertheless, the bodily that means of that usually stays behind. Then again, it isn’t so clear why the next transpose-related formulation really work:

    • (AB)T = BTAT,
    • (y, Ax) = (x, ATy),
    • (ATA)T = ATA.

    On this story, I’m going to present my interpretation of the transpose operation, which, amongst others, will present why the talked about formulation are literally the way in which they’re. So let’s dive in!

    However to start with, let me remind all of the definitions which are used all through the tales of this collection:

    • Matrices are denoted with uppercase (like ‘A‘, ‘B‘), whereas vectors and scalars are denoted with lowercase (like ‘x‘, ‘y‘ or ‘m‘, ‘n‘).
    • |x| – is the size of vector ‘x‘,
    • rows(A) – variety of rows of matrix ‘A‘,
    • columns(A) – variety of columns of matrix ‘A‘,
    • AT – the transpose of matrix ‘A‘,
    • aTi,j – the worth on the i-th row and j-th column of the transposed matrix AT,
    • (x, y) – dot product of vectors ‘x‘ and ‘y‘ (i.e. “x1y1 + x2y2 + … + xnyn“).

    Transpose vs. X-way interpretation

    In part 1 of this collection – “matrix-vector multiplication” [1], I launched the X-way interpretation of matrices. Let’s recollect it with an instance:

    An instance of a matrix and corresponding X-diagram. All arrows within the diagram are directed from proper to left. The arrow which begins at merchandise ‘j’ on the correct and finishes at merchandise ‘i’ on the left corresponds to cell “ai,j” of the matrix.

    From there, we additionally keep in mind that the left stack of the X-diagram of ‘A‘ may be related to rows of matrix ‘A‘, whereas its proper stack may be related to the columns.

    Within the X-diagram of matrix ‘A’, the values which go from the three’rd from the highest merchandise of the correct stack are the values of three’rd column of ‘A’ (highlighted in pink).
    On the identical time, the values which come to the two’nd from the highest merchandise of the left stack are the values of two’nd row of ‘A’ (highlighted in purple).

    Now, if transposing a matrix is definitely flipping the desk round its important diagonal, it implies that all of the columns of ‘A‘ grow to be rows in ‘AT‘, and vice versa.

    The unique matrix ‘A’ and its transpose ‘AT‘. We see how the three’rd column of ‘A’ turns into the three’rd row in ‘AT‘.

    And if transposing means altering the locations of rows and columns, then maybe we will do the identical on the X-diagram? Thus, to swap rows and columns of the X-diagram, we should always flip it horizontally:

    Horizontal flip of the X-diagram of ‘A’ corresponds to the transpose of ‘A’. We see that the values adjoining to three’rd from prime merchandise of proper stack of authentic X-diagram (3’rd column of ‘A’), that are [9, 7, 14], are the identical as values adjoining to three’rd from prime merchandise of left stack of the flipped X-diagram (3’rd row of AT).

    Will the horizontally flipped X-diagram of ‘A‘ signify the X-diagram of ‘AT‘? We all know that cell “ai,j” is current within the X-diagram because the arrow ranging from the j‘th merchandise of the left stack, and directed in direction of the i‘th merchandise of the correct stack. After flipping horizontally, that very same arrow will begin now from the i‘th merchandise of the correct stack and might be directed to the j‘th merchandise of the left stack.

    The worth “a1,3 = 9″ equals the worth “aT3,1 = 9″.

    Which implies that the definition of transpose “ai,j = aTj,i” does maintain.

    Concluding this chapter, we now have seen that transposing matrix ‘A‘ is similar as horizontally flipping its X-diagram.


    Transposing a series of matrices

    Let’s see how decoding AT as a horizontal flip of its X-diagram will assist us to uncover the bodily that means of some transpose-related formulation. Let’s begin with the next:

    [begin{equation*}
    (AB)^T = B^T A^T
    end{equation*}]

    which says that transposing the multiplication “A*B” is similar as multiplying transpositions AT and BT, however in reverse order. Now, why does the order really grow to be reversed?

    From part 2 of this collection – “matrix-matrix multiplication” [2], we keep in mind that the matrix multiplication “A*B” may be interpreted as a concatenation of X-diagrams of ‘A‘ and ‘B‘. Thus, having:

    y = (AB)x = A*(Bx)

    will power the enter vector ‘x‘ to go at first by the transformation of matrix ‘B‘, after which the intermediate outcome will undergo the transformation of matrix ‘A‘, after which the output vector ‘y‘ might be obtained.

    Transferring enter vector ‘x’ from proper to left, by X-diagrams of ‘A’ and ‘B’. At first, after shifting by the transformation of ‘B’, it turns into an intermediate vector ‘t = Bx’, which, after shifting by the transformation of ‘A’, turns into the ultimate vector ‘y = At = A(Bx)’.

    And now the bodily that means of the method “(AB)T = BTAT” turns into clear: flipping horizontally the X-diagram of the product “A*B” will clearly flip the separate X-diagrams of ‘A‘ and the one among ‘B‘, however it additionally will reverse their order:

    Flipping horizontally 2 adjoining figures ‘A’ and ‘B’ will outcome within the horizontal flip of each figures individually (step 1), in addition to in swapping their order (step 2).

    Within the earlier story [2], we now have additionally seen {that a} cell ci,j of the product matrix ‘C=A*B‘ describes all of the attainable methods through which xj of the enter vector ‘x‘ can have an effect on yi of the output vector ‘y = (AB)x‘.

    Concatenation of X-diagrams of ‘A’ and ‘B’, which corresponds to the product “A*B”. All 4 attainable paths by which the enter worth ‘x4‘ can have an effect on the output worth ‘y2‘ are highlighted in pink.

    Now, when transposing the product “C=A*B“, thus calculating matrix CT, we wish to have the mirroring impact – so cTj,i will describe all attainable methods by which yj can have an effect on xi. And in an effort to get that, we should always simply flip the concatenation diagram:

    If “C = A*B”, then the worth of “c2,4” corresponds to the sum of all 4 attainable paths from ‘x4‘ to ‘y2‘ (highlighted in pink). On the identical time, it is the same as “c2,4 = cT4,2“, which corresponds to the sum of the identical 4 attainable paths from ‘y2‘ to ‘x4‘, within the horizontally flipped concatenation of “A*B”, which is “BTAT“.

    In fact, this interpretation may be generalized on transposing the product of a number of matrices:

    [begin{equation*}
    (ABC)^T = C^T B^T A^T
    end{equation*}]

    Horizontally flipping 3 adjoining gadgets ‘A’, ‘B’, and ‘C’ (not essentially matrices), and reversing their order can have the impact of horizontally flipping the sequence “ABC” itself.

    Why ATA is at all times symmetrical, for any matrix A

    A symmetrical matrix ‘S‘ is such an nxn sq. matrix, the place for any indexes i, j ∈ [1..n], we now have ‘si,j = sj,i‘. Which means that it’s symmetrical upon its diagonal, in addition to that transposing it would don’t have any impact.

    An instance of a 4×4 symmetrical matrix. All values are symmetrical alongside the primary diagonal. For instance, “a3,1 = a1,3 = 16″.

    We see that transposing a symmetrical matrix can have no impact. So, a matrix ‘S‘ is symmetrical if and provided that:

    [begin{equation*}
    S^T = S
    end{equation*}]

    Equally, the X-diagram of a symmetrical matrix ‘S‘ has the property that it isn’t modified after a horizontal flip. That’s as a result of for any arrow si,j we now have an equal arrow sj,i there:

    An instance of a 3×3 symmetrical matrix ‘S’ and its X-diagram. We now have there ‘s1,2 = s2,1 = 4′. Corresponding arrows are highlighted.

    In matrix evaluation, we now have a method stating that for any matrix ‘A‘ (not essentially symmetrical), the product ATA is at all times a symmetrical matrix. In different phrases:

    [begin{equation*}
    (A^T A)^T = A^T A
    end{equation*}]

    It isn’t simple to really feel the correctness of this method if taking a look at matrix multiplication within the conventional approach. However its correctness turns into apparent if taking a look at matrix multiplication because the concatenation of their X-diagrams:

    Concatenation of ‘AT‘ and ‘A’, which is a concatenation of two mirrored objects, is at all times a symmetrical object. Flipping such a concatenation horizontally can have no impact.

    What’s going to occur if an arbitrary matrix ‘A‘ is concatenated with its horizontal flip AT? The outcome ATA might be symmetrical, as after a horizontal flip, the correct issue ‘A‘ involves the left facet and is flipped, turning into AT, whereas the left issue AT involves the correct facet and can also be flipped, turning into ‘A‘.

    That is why for any matrix ‘A‘, the product ATA is at all times symmetrical.


    Understanding why (y, Ax) = (x, ATy)

    There’s one other method in matrix evaluation, stating that:

    [begin{equation*}
    (y, Ax) = (x, A^T y)
    end{equation*}]

    the place “(u, v)” is the dot product of vectors ‘u‘ and ‘v‘:

    [begin{equation*}
    (u,v) = u_1 v_1 + u_2 v_2 + dots + u_n v_n
    end{equation*}]

    The dot product may be calculated just for vectors of equal size. Additionally, the dot product shouldn’t be a vector however a single quantity. If making an attempt as an instance the dot product “(u, v)” in a approach much like X-diagrams, we will draw one thing like this:

    Because the dot product is the buildup of phrases ui*vi , we will current it because the sum of all attainable paths from the correct endpoint to the left one.

    Now, what does the expression (y, Ax) really imply? It’s the dot product of vector ‘y‘ by the vector “Ax” (or by vector ‘x‘, which went by the transformation of “A“). For the expression (y, Ax) to make sense, we should always have:

    |x| = columns(A), and
    |y| = rows(A).

    At first, let’s calculate (y, Ax) formally. Right here, each worth yi is multiplied by the i-th worth of the vector Ax, denoted right here as “(Ax)i“:

    [begin{equation*}
    (Ax)_i = a_{i,1}x_1 + a_{i,2}x_2 + dots + a_{i,m}x_m
    end{equation*}]

    After one multiplication, we can have:

    [begin{equation*}
    y_i(Ax)_i = y_i a_{i,1}x_1 + y_i a_{i,2}x_2 + dots + y_i a_{i,m}x_m
    end{equation*}]

    And after summing all of the phrases by “i ∈ [1, n]”, we can have:

    [begin{equation*}
    begin{split}
    (y, Ax) = y_1(Ax)_1 + y_2(Ax)_2 + dots + y_n(Ax)_n =
    = y_1 a_{1,1}x_1 + y_1 a_{1,2}x_2 + &dots + y_1 a_{1,m}x_m +
    + y_2 a_{2,1}x_1 + y_2 a_{2,2}x_2 + &dots + y_2 a_{2,m}x_m +
    &vdots
    + y_n a_{n,1}x_1 + y_n a_{n,2}x_2 + &dots + y_n a_{n,m}x_m
    end{split}
    end{equation*}]

    which clearly exhibits that within the product (y, Ax), each cell ai,j of the matrix “A” participates precisely as soon as, along with the elements yi and xj.

    Now let’s transfer to X-diagrams. If we wish to draw one thing like an X-diagram of vector “Ax“, we will do it within the following approach:

    The product “Ax” is a vector of size equal to “|Ax| = rows(A)”, whereas “|x| = columns(A)”. Right here, values of vector “x” are connected from the correct facet, and on the left facet, we obtain values of the outcome vector “Ax”.

    Subsequent, if we wish to draw the dot product (y, Ax), we will do it this fashion:

    Values of vector ‘y’ are connected to the left facet of the X-diagram of “A”, whereas values of vector ‘x’ stay connected to its proper facet.

    On this diagram, let’s see what number of methods there are to achieve the left endpoint from the correct one. The trail from proper to left can go by any arrow of A‘s X-diagram. If passing by a sure arrow ai,j, it is going to be the trail composed of xj, the arrow ai,j, and yi.

    If a path from proper to left passes by arrow “a4,2” of the X-diagram of “A”, then it additionally passes by values “y4” and “x2“.

    And this precisely matches the formal habits of (y, Ax) derived a bit above, the place (y, Ax) was the sum of all triples of the shape “yi*ai,j*xj“. And we will conclude right here that if taking a look at (y, Ax) within the X-interpretation, it is the same as the sum of all attainable paths from the correct endpoint to the left one.

    Now, what’s going to occur if we flip this complete diagram horizontally?

    Horizontally flipping the X-diagram of “(y, Ax)” ends in the X-diagram of “(x, ATy)”.

    From the algebraic perspective, the sum of all paths from proper to left won’t change, as all collaborating phrases stay the identical. However wanting from the geometrical perspective, the vector ‘y‘ goes to the correct half, the vector ‘x‘ involves the left half, and the matrix “A” is being flipped horizontally; in different phrases, “A” is transposed. So the flipped X-diagram corresponds to the dot product of vectors “x” and “ATy” now, or has the worth of (x, ATy). We see that each (y, Ax) and (x, ATy) signify the identical sum, which proves that:

    [begin{equation*}
    (y, Ax) = (x, A^T y)
    end{equation*}]


    Conclusion

    That’s all I needed to current in regard to the matrix transpose operation. I hope that the visible strategies illustrated above will assist all of us to realize a greater grasp of varied matrix operations.

    Within the subsequent (and doubtless the final) story of this collection, I’ll handle inverting matrices, and the way it may be visualized by X-interpretation. We are going to see why formulation like “(AB)-1 = B-1A-1” are the way in which they really are, and we are going to observe how the inverse works on a number of particular kinds of matrices.

    So see you within the subsequent story!


    My gratitude to:

    – Asya Papyan, for the exact design of all of the used illustrations (linkedin.com/in/asya-papyan-b0a1b0243/),
    – Roza Galstyan, for cautious evaluate of the draft (linkedin.com/in/roza-galstyan-a54a8b352/).

    For those who loved studying this story, be at liberty to observe me on LinkedIn, the place, amongst different issues, I will even publish updates (linkedin.com/in/tigran-hayrapetyan-cs/).

    All used pictures, except in any other case famous, are designed by request of the writer.


    References

    [1] – Understanding matrices | Half 1: matrix-vector multiplication – https://towardsdatascience.com/understanding-matrices-part-1-matrix-vector-multiplication/

    [2] – Understanding matrices | Half 2: matrix-matrix multiplication – https://towardsdatascience.com/understanding-matrices-part-2-matrix-matrix-multiplication/



    Source link

    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleHow I created a personal Virtual Advisory Board | by Charles Valentine | Jul, 2025
    Next Article OpenAI CEO Sam Altman Is Terrified About AI Bank Fraud
    Team_AIBS News
    • Website

    Related Posts

    Artificial Intelligence

    I Tested TradingView for 30 Days: Here’s what really happened

    August 3, 2025
    Artificial Intelligence

    Tested an AI Crypto Trading Bot That Works With Binance

    August 3, 2025
    Artificial Intelligence

    Tried Promptchan So You Don’t Have To: My Honest Review

    August 3, 2025
    Add A Comment
    Leave A Reply Cancel Reply

    Top Posts

    How Flawed Human Reasoning is Shaping Artificial Intelligence | by Manander Singh (MSD) | Aug, 2025

    August 3, 2025

    I Tried Buying a Car Through Amazon: Here Are the Pros, Cons

    December 10, 2024

    Amazon and eBay to pay ‘fair share’ for e-waste recycling

    December 10, 2024

    Artificial Intelligence Concerns & Predictions For 2025

    December 10, 2024

    Barbara Corcoran: Entrepreneurs Must ‘Embrace Change’

    December 10, 2024
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    Most Popular

    How I Finally Figured Out How LLM Works | by Rajan Bharti | Jul, 2025

    July 9, 2025

    Autonomous Surgical Robots Enhance Precision in the OR

    May 22, 2025

    Deploy an in-house Vision Language Model to parse millions of documents: say goodbye to Gemini and OpenAI. | by Jeremy Arancio | Apr, 2025

    April 23, 2025
    Our Picks

    How Flawed Human Reasoning is Shaping Artificial Intelligence | by Manander Singh (MSD) | Aug, 2025

    August 3, 2025

    Exaone Ecosystem Expands With New AI Models

    August 3, 2025

    4 Easy Ways to Build a Team-First Culture — and How It Makes Your Business Better

    August 3, 2025
    Categories
    • AI Technology
    • Artificial Intelligence
    • Business
    • Data Science
    • Machine Learning
    • Technology
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • About us
    • Contact us
    Copyright © 2024 Aibsnews.comAll Rights Reserved.

    Type above and press Enter to search. Press Esc to cancel.