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.

 

Repellat reprehenderit dolorem consequatur rerum blanditiis ullam. Sunt repellendus quibusdam molestiae aperiam in fugiat veniam. Ipsa reiciendis occaecati nostrum. Enim esse accusantium beatae omnis eos et ut magnam.

Quia excepturi numquam sit distinctio et illo. Impedit blanditiis alias autem repellat dolor ipsa suscipit.

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

Career Advancement Opportunities

July 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • JPMorgan 01 98.3%
  • Guggenheim Partners 01 97.8%
  • Morgan Stanley 07 97.2%

Overall Employee Satisfaction

July 2026 Investment Banking

  • Moelis & Company No 99.4%
  • Evercore No 98.9%
  • Morgan Stanley 01 98.3%
  • Banco Santander 02 97.7%
  • BMO Capital Markets 12 97.2%

Professional Growth Opportunities

July 2026 Investment Banking

  • Evercore 01 99.4%
  • Moelis & Company 01 98.9%
  • Morgan Stanley 06 98.3%
  • Goldman Sachs 01 97.8%
  • JPMorgan 01 97.2%

Total Avg Compensation

July 2026 Investment Banking

  • Vice President (16) $429
  • Associates (46) $258
  • 3rd+ Year Analyst (8) $210
  • 2nd Year Analyst (22) $179
  • Intern/Summer Associate (14) $159
  • 1st Year Analyst (80) $150
  • Intern/Summer Analyst (73) $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
kanon's picture
kanon
99.0
3
Secyh62's picture
Secyh62
99.0
4
BankonBanking's picture
BankonBanking
99.0
5
DrApeman's picture
DrApeman
98.9
6
dosk17's picture
dosk17
98.9
7
Betsy Massar's picture
Betsy Massar
98.9
8
CompBanker's picture
CompBanker
98.9
9
GameTheory's picture
GameTheory
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...”