Is it Possible? - Matrix multiplication

Is it possible to extract the diagonal elements of a matrix into a vector by using matrix multiplication only? If it is possible show how ;)

I'm curious how long it will take for you guys to answer this. Btw, no element by element multiplication is allowed.

5 Comments
 

Look, I don't know how to do it in excel because I refuse to lower my standards to it, but in general

Ax = b

Take a 2-by-2 matrix A, where a_ij is the ith row and jth column element (i,j =2). Then you want b = [a_11 a_22]^T (T is the transpose). In this case,

Ax = b (A^-1)Ax = (A^-1)b

hence x = (A^-1)b

So matrix A has to be invertible. If you can find the inverse of a matrix using your software, then simply multiply this inverse matrix by the vector of diagonals to get this vector x, which you need to multiply to the vector of diagonals.

Just Do It
 
Best Response
maximumlikelihoodLook, I don't know how to do it in excel because I refuse to lower my standards to it, but in general

Ax = b

Take a 2-by-2 matrix A, where a_ij is the ith row and jth column element (i,j =2). Then you want b = [a_11 a_22]^T (T is the transpose). In this case,

Ax = b (A^-1)Ax = (A^-1)b

hence x = (A^-1)b

So matrix A has to be invertible. If you can find the inverse of a matrix using your software, then simply multiply this inverse matrix by the vector of diagonals to get this vector x, which you need to multiply to the vector of diagonals.

That's pretty much the way to do it, but in this case I am not allowed to use any 'find' commands, nor am I able to use any other commands that create a diagonal matrix (all elements besides the diagonal are zero). I am only allowed to use the multiplication of matrices, and am constrained by the number of multiplications I can perform.

 

Et et qui veniam fugiat. Amet est in dolor sint unde autem cum. Sint neque magni quis eligendi et. Non fugiat accusamus sit. Molestias architecto minima repudiandae neque doloremque harum alias.

Pariatur adipisci laboriosam commodi dignissimos. Sunt ut velit aut ea ut nulla. Est dolorem beatae eligendi sed. Id nesciunt dolorem rerum fuga. Est sequi odio et commodi consequatur quo. Ea quaerat quidem voluptatum suscipit.

Est porro sed dignissimos rerum. Odio autem qui non cum. Perspiciatis cum repellat sit rerum et ea consequatur. Quia recusandae nisi incidunt et expedita molestiae sed.

Follow the shit your fellow monkeys say @shitWSOsays Life is hard, it's even harder when you're stupid - John Wayne

Career Advancement Opportunities

June 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.8%
  • JPMorgan 01 98.2%
  • Guggenheim Partners 01 97.7%
  • Morgan Stanley 07 97.1%

Overall Employee Satisfaction

June 2026 Investment Banking

  • Moelis & Company No 99.4%
  • Morgan Stanley 02 98.8%
  • Evercore 01 98.2%
  • BMO Capital Markets 12 97.6%
  • Banco Santander 01 97.1%

Professional Growth Opportunities

June 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.8%
  • Morgan Stanley 05 98.2%
  • JPMorgan No 97.7%
  • BMO Capital Markets 12 97.1%

Total Avg Compensation

June 2026 Investment Banking

  • Vice President (14) $434
  • Associates (43) $259
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (22) $179
  • Intern/Summer Associate (13) $156
  • 1st Year Analyst (77) $151
  • Intern/Summer Analyst (71) $101
notes
16 IB Interviews Notes

“... there’s no excuse to not take advantage of the resources out there available to you. Best value for your $ are the...”

Leaderboard

1
redever's picture
redever
99.2
2
Secyh62's picture
Secyh62
99.0
3
BankonBanking's picture
BankonBanking
99.0
4
kanon's picture
kanon
99.0
5
DrApeman's picture
DrApeman
98.9
6
dosk17's picture
dosk17
98.9
7
GameTheory's picture
GameTheory
98.9
8
Betsy Massar's picture
Betsy Massar
98.9
9
CompBanker's picture
CompBanker
98.9
10
Jamoldo's picture
Jamoldo
98.8
success
From 10 rejections to 1 dream investment banking internship

“... I believe it was the single biggest reason why I ended up with an offer...”