# LinearSolve symbolic equations

I am trying to use mathematica to solve the following system of equation, but I can not for the life of me get it to work. I have the following:

Stiffness = ((Y*A)/L )*{{1, -1, 0, 0}, {-1, 2, -1, 0}, {0, -1,
2, -1}, {0, 0, -1, 1}} // MatrixForm

Displacements = {{0}, {a}, {b}, {0}} // MatrixForm

Force = {{x}, {(7*L^3 )/162}, {(10*L^3)/81}, {y}} // MatrixForm


I need to solve:

Stiffness * Displacements = Force


When I use LinearSolve it just spits back the input command. I need to solve for a, b, x, and y. Thanks for the help.

• I find your question a duplicate of at least a few another ones, e.g. How to Solve or LinearSolve A=I matrix equation?. In any case you can do: Solve[ Stiffness[].Displacements[] == Force[], {a, b, x, y}] yielding {{a -> (17 L^4)/(243 A Y), b -> (47 L^4)/(486 A Y), x -> -((17 L^3)/243), y -> -((47 L^3)/486)}}. Incorrect usage: * and =, use . and == respectively i.e. (Dot and Equal) instead of Times and Set. – Artes Jan 22 '14 at 2:28

There are a few things wrong with the code: MatrixForm is just for display, you have extra brackets in the lists, use dot . for matrix multiplication, double equals == to define an equation, and you need to ask it to solve for the desired variables:
Stiffness = ((Y*A)/L)*{{1, -1, 0, 0}, {-1, 2, -1, 0}, {0, -1, 2, -1}, {0, 0, -1, 1}};
{"ft_lang_label":"__label__en","ft_lang_prob":0.7157312,"math_prob":0.9907814,"size":839,"snap":"2020-45-2020-50","text_gpt3_token_len":318,"char_repetition_ratio":0.097005986,"word_repetition_ratio":0.0,"special_character_ratio":0.46841478,"punctuation_ratio":0.2292683,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99930644,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-22T17:55:33Z\",\"WARC-Record-ID\":\"<urn:uuid:7a849685-253a-41ef-9931-980767135506>\",\"Content-Length\":\"145890\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:11553131-22d2-4157-bb39-5776c2624497>\",\"WARC-Concurrent-To\":\"<urn:uuid:2ad21f06-4f0a-4353-8379-7c7c25169213>\",\"WARC-IP-Address\":\"151.101.193.69\",\"WARC-Target-URI\":\"https://mathematica.stackexchange.com/questions/40890/linearsolve-symbolic-equations\",\"WARC-Payload-Digest\":\"sha1:FKG4WNT434YZPBNFQ2WTUA5ZGSR45A2A\",\"WARC-Block-Digest\":\"sha1:LOJW5SC2IMHUM4COVGU5TWCJGUNHCFQ6\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107880014.26_warc_CC-MAIN-20201022170349-20201022200349-00600.warc.gz\"}"}