Deductions & credits

look at 

 

https://www.irs.gov/pub/irs-pdf/p936.pdf

 

page 2: 

 

Note. Interest on home equity loans and lines of credit are deductible only if the borrowed funds are used to buy, build, or substantially improve the taxpayer’s home that secures the loan

 

if you borrow against one home and use the proceeds against another home, it's not tax-deductible.  Example: I own my home free and clear.  I borrow against it to buy a vacation home.  The interest is not tax deductible because I did not use the funds to buy, build or improve the home that secures the loan.